From 14d035dbc4290a265352d4fb6fe7c2d55d998e6c Mon Sep 17 00:00:00 2001 From: Gerd Aschemann Date: Fri, 29 Mar 2024 18:46:32 +0100 Subject: [PATCH] #318 Try to find files in current directory --- .github/workflows/test-java-os-mix.yml | 13 +++++++++++++ build.gradle | 8 ++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test-java-os-mix.yml b/.github/workflows/test-java-os-mix.yml index dc0f6fc8..29dbbb32 100644 --- a/.github/workflows/test-java-os-mix.yml +++ b/.github/workflows/test-java-os-mix.yml @@ -57,6 +57,19 @@ jobs: ./gradlew --version ./gradlew htmlSanityCheck --scan + - name: Execute integration test (Windows) + if: runner.os == 'Windows' + shell: pwsh + run: | + uname -a + cmd /c "echo off && gradlew.bat --version" + cmd /c "echo off && gradlew.bat info" + cmd /c "echo off && gradlew.bat integrationTestOnly --scan" + + # If we ever need to debug the file system contents + # Get-ChildItem -Recurse -File | Format-Table Name, Length, LastWriteTime + # Get-ChildItem -Recurse -File ./integration-test | Format-Table Name, Length, LastWriteTime + - name: Collect state upon failure if: failure() run: | diff --git a/build.gradle b/build.gradle index 6efefa5d..6e7b67ca 100644 --- a/build.gradle +++ b/build.gradle @@ -368,8 +368,12 @@ tasks.register("integrationTestCliOnly") { workingDir INTEGRATION_TEST_DIRECTORY_CLI file(BUILD_REPORTS_DIRECTORY).mkdirs() String hscScriptFileName = "../../htmlSanityCheck-cli/${Project.DEFAULT_BUILD_DIR_NAME}/install/hsc/bin/hsc" - commandLine System.getProperty("os.name") ==~ /Windows.*/ ? "${hscScriptFileName.replace('/', '\\')}.bat" : hscScriptFileName, - "-r", BUILD_REPORTS_DIRECTORY, "../common/src/test/resources" + String params = "-r ${BUILD_REPORTS_DIRECTORY} ../common/src/test/resources" + if (System.getProperty("os.name") ==~ /Windows.*/) { + commandLine 'cmd', '/c', "echo off && ${hscScriptFileName.replace('/', '\\')}.bat ${params}" + } else { + commandLine 'sh', '-c', "${hscScriptFileName} ${params}" + } } logger.debug "Script output: ${result}" assert testIndex.exists()