diff --git a/.github/workflows/ci-workflow.yml b/.github/workflows/ci-workflow.yml index ff5112859de..d98ecbae6db 100644 --- a/.github/workflows/ci-workflow.yml +++ b/.github/workflows/ci-workflow.yml @@ -237,6 +237,8 @@ jobs: - name: Test shell: cmd + env: + KUZU_TEST_TEMP_DIR: ${{ env.TEMP }}/kuzu-${{ env.RUN_ID }} run: | call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" make test @@ -370,7 +372,7 @@ jobs: steps: - uses: actions/checkout@v3 - + # For `napi.h` header. - name: Ensure Node.js dependencies run: npm install --include=dev @@ -417,6 +419,8 @@ jobs: run: make all - name: Test + env: + KUZU_TEST_TEMP_DIR: ${{ env.TEMP }}/kuzu-${{ env.RUN_ID }} run: | ulimit -n 10240 make test @@ -538,6 +542,8 @@ jobs: cat postgres_scanner.test - name: Extension test + env: + KUZU_TEST_TEMP_DIR: ${{ env.TEMP }}/kuzu-${{ env.RUN_ID }} run: | cd scripts/ && python3 http-server.py & make extension-test && make clean @@ -575,6 +581,8 @@ jobs: - name: Extension test shell: cmd + env: + KUZU_TEST_TEMP_DIR: ${{ env.TEMP }}/kuzu-${{ env.RUN_ID }} run: | call "C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Auxiliary\Build\vcvars64.bat" cd scripts/ && start /b python http-server.py && cd .. diff --git a/test/include/test_helper/test_helper.h b/test/include/test_helper/test_helper.h index c0fadd1bd30..111941ad009 100644 --- a/test/include/test_helper/test_helper.h +++ b/test/include/test_helper/test_helper.h @@ -50,7 +50,12 @@ class TestHelper { static std::string getMillisecondsSuffix(); inline static std::filesystem::path getTempDir() { - return std::filesystem::temp_directory_path() / "kuzu"; + auto tempDir = std::getenv("KUZU_TEST_TEMP_DIR"); + if (tempDir != nullptr) { + return std::filesystem::path(tempDir); + } else { + return std::filesystem::temp_directory_path() / "kuzu"; + } } inline static std::string getTempDir(const std::string& name) {