diff options
-rw-r--r-- | .github/workflows/ci_master.yml | 7 | ||||
-rw-r--r-- | tests/gdtest/gdtest.c | 10 |
2 files changed, 4 insertions, 13 deletions
diff --git a/.github/workflows/ci_master.yml b/.github/workflows/ci_master.yml index 2c21d7c..be1eef2 100644 --- a/.github/workflows/ci_master.yml +++ b/.github/workflows/ci_master.yml @@ -132,8 +132,6 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - mkdir tmp - export TMP=${{github.workspace}}/tmp echo "LSAN_OPTIONS=suppressions=${{ github.workspace }}/suppressions/lsan.supp" >> $GITHUB_ENV CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} @@ -151,8 +149,6 @@ jobs: # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: | - mkdir tmp - export TMP=${{github.workspace}}/tmp cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1 -DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} @@ -168,13 +164,12 @@ jobs: # Execute tests defined by the CMake configuration. # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: | - mkdir tmp - export TMP=${{github.workspace}}/tmp CTEST_OUTPUT_ON_FAILURE=1 ctest -C ${{env.BUILD_TYPE}} - name: Output Log if: contains(matrix.os, 'ubuntu') run: | + ls /tmp if test -f "/home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log"; then cat /home/runner/work/libgd/libgd/build/Testing/Temporary/LastTest.log fi diff --git a/tests/gdtest/gdtest.c b/tests/gdtest/gdtest.c index e2a2582..0ce9da9 100644 --- a/tests/gdtest/gdtest.c +++ b/tests/gdtest/gdtest.c @@ -301,13 +301,9 @@ const char *gdTestTempDir(void) // Mingw defines it tmpdir_root = getenv("TMP"); if (tmpdir_root == NULL) { -#if defined(__MINGW32__) || defined(__MINGW64__) - // On MingW it seems we fail too often. Let default to this and create it ourselves - tmpdir_root = "./tmp"; - if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root) == 0) { -#else - if (!gdTestIsDir(tmpdir_root) && mkdir(tmpdir_root, 0700) == 0) { -#endif + // Fall back here. + tmpdir_root = "/tmp"; + if (!gdTestIsDir(tmpdir_root)) { printf("tmpdir failed to be used or initialized (%s).", tmpdir_root); exit(2); } |