From ea44be9b9470e36f8e637c19b026e1c431637edc Mon Sep 17 00:00:00 2001 From: Myk Date: Thu, 2 Jun 2022 15:50:17 -0700 Subject: [PATCH] Enable fortress tests in CI (#2153) * download and cache the test save along with df Depends on us actually putting the test save on files.dfhack.org * run fortress tests in run-tests.py * use google drive link for now * make the save directory before extracting to it --- ci/download-df.sh | 33 +++++++++++++++++++++------------ ci/run-tests.py | 2 +- 2 files changed, 22 insertions(+), 13 deletions(-) diff --git a/ci/download-df.sh b/ci/download-df.sh index 49dcedea7..2fd095c1d 100755 --- a/ci/download-df.sh +++ b/ci/download-df.sh @@ -2,7 +2,8 @@ set -e -tardest="df.tar.bz2" +df_tardest="df.tar.bz2" +save_tardest="test_save.tgz" selfmd5=$(openssl md5 < "$0") echo $selfmd5 @@ -16,40 +17,48 @@ cd "$DF_FOLDER/.." if [ -f receipt ]; then if [ "$selfmd5" != "$(cat receipt)" ]; then - echo "download-df.sh changed; removing DF" + echo "download-df.sh changed; re-downloading tarballs" rm receipt else - echo "Already downloaded $DF_VERSION" + echo "Already downloaded $DF_VERSION tarballs" fi fi if [ ! -f receipt ]; then - rm -f "$tardest" + rm -f "$df_tardest" "$save_tardest" minor=$(echo "$DF_VERSION" | cut -d. -f2) patch=$(echo "$DF_VERSION" | cut -d. -f3) - url="http://www.bay12games.com/dwarves/df_${minor}_${patch}_linux.tar.bz2" - echo Downloading + echo "Downloading DF $DF_VERSION" while read url; do echo "Attempting download: ${url}" - if wget -v "$url" -O "$tardest"; then + if wget -v "$url" -O "$df_tardest"; then break fi done < receipt diff --git a/ci/run-tests.py b/ci/run-tests.py index 11534b3f9..be2a02b3f 100755 --- a/ci/run-tests.py +++ b/ci/run-tests.py @@ -73,7 +73,7 @@ with open(test_init_file, 'w') as f: f.write(''' devel/dump-rpc dfhack-rpc.txt :lua dfhack.internal.addScriptPath(dfhack.getHackPath()) - test --resume --modes=none,title "lua scr.breakdown_level=df.interface_breakdown_types.%s" + test --resume -- lua scr.breakdown_level=df.interface_breakdown_types.%s ''' % ('NONE' if args.no_quit else 'QUIT')) test_config_file = 'test_config.json'