diff --git a/.circleci/config.yml b/.circleci/config.yml index 08cfacc49..78abcb6e7 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ jobs: pip3 install lxml bs4 --quiet echo "================= Integration tests =================" python3 ./integration.py - ./test_curl_commands.sh tests/*.curl + ./test_curl_commands.sh $(find ./tests -maxdepth 1 -type f -name '*.curl' ! -name '*windows*') python3 ./test_html_output.py tests/*.html xmllint --noout tests/*.html - store_artifacts: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 008f852ad..016eeef12 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -127,7 +127,7 @@ jobs: cd integration pip install lxml bs4 ./integration.py - ./test_curl_commands.sh tests/*.curl + ./test_curl_commands.sh $(find ./tests -maxdepth 1 -type f -name '*.curl' ! -name '*windows*') ./test_html_output.py tests/*.html xmllint --noout tests/*.html ./report.sh diff --git a/integration/test_hurl.py b/integration/test_hurl.py index c4427d447..64af56ceb 100755 --- a/integration/test_hurl.py +++ b/integration/test_hurl.py @@ -33,11 +33,19 @@ def get_os(): def test(hurl_file): - - options_file = hurl_file.replace('.hurl','.options') - curl_file = hurl_file.replace('.hurl','.curl') - json_output_file = hurl_file.replace('.hurl','.output.json') - profile_file = hurl_file.replace('.hurl','.profile') + + options_file = hurl_file.replace('.hurl', '.options') + + # For .curl file, we can have specific os expected file in order to test + # os differences like included path (/ vs \ path components separator) + os_curl_file = hurl_file.replace('.hurl', '.' + get_os() + '.curl') + if os.path.exists(os_curl_file): + curl_file = os_curl_file + else: + curl_file = hurl_file.replace('.hurl', '.curl') + + json_output_file = hurl_file.replace('.hurl', '.output.json') + profile_file = hurl_file.replace('.hurl', '.profile') options = [] if os.path.exists(options_file):