diff options
author | Pierre Joye <pierre.php@gmail.com> | 2016-07-12 12:50:27 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2016-07-12 12:50:27 +0700 |
commit | 1cec6ea1d7d34b82c57cd8e623019a2ac4581031 (patch) | |
tree | ba990d934d9eaf00dc411ed8f57ae3366a5eb6b6 /windows | |
parent | 5bc1b232b02f593c598c55e9d86fc154964b5cc5 (diff) | |
download | libgd-1cec6ea1d7d34b82c57cd8e623019a2ac4581031.tar.gz |
fix build and run tests
Diffstat (limited to 'windows')
-rw-r--r-- | windows/Makefile.vc | 22 | ||||
-rw-r--r-- | windows/run_tests.bat | 16 |
2 files changed, 22 insertions, 16 deletions
diff --git a/windows/Makefile.vc b/windows/Makefile.vc index 344a957..4de71af 100644 --- a/windows/Makefile.vc +++ b/windows/Makefile.vc @@ -155,7 +155,8 @@ make_dirs: @if not exist $(SDR) mkdir $(SDR) run_tests: - @windows\run_tests + @cd $(TDR) + @$(MAKEDIR)\windows\run_tests # libgd $(LIBGD_OBJ_DIR): @@ -195,11 +196,18 @@ $(SDR)readdir.obj: $(TARGETDLL) $(TEST_CONFIG) tests\gdtest\readdir.c @$(CC) $(CFLAGS) /c tests\gdtest\readdir.c /Fo$(SDR)readdir.obj $(TEST_CONFIG): - @echo #define GDTEST_TOP_DIR "$(MAKEDIR:\=\\)\\tests" > tests\test_config.h - @echo #define snprintf _snprintf >> tests\test_config.h + @echo #ifndef GD_TEST_CONFIG_H> tests\test_config.h + @echo #define GD_TEST_CONFIG_H>> tests\test_config.h + @echo #ifndef GDTEST_TOP_DIR>> tests\test_config.h + @echo #define GDTEST_TOP_DIR "$(MAKEDIR:\=\\)\\tests">> tests\test_config.h + @echo #endif>> tests\test_config.h + @echo #ifndef _WIN32>> tests\test_config.h + @echo #define snprintf _snprintf>> tests\test_config.h + @echo #endif>> tests\test_config.h + @echo #endif>> tests\test_config.h $(TEST_LIST): $(TARGETDLL) - @if not exist $(TDR) mkdir $(TDR) - @copy $(TARGETDLL) $(TDR)$(GD_DLL) - @copy NUL $(TDR)testlist.txt - @for %%F in ($(TESTS)) do @echo %%F >> $(TDR)testlist.txt
\ No newline at end of file + if not exist $(TDR) mkdir $(TDR) + copy $(TARGETDLL) $(TDR)$(GD_DLL) + copy NUL $(TEST_LIST) + for %%F in ($(TESTS)) do @echo %%F >> $(TEST_LIST)
\ No newline at end of file diff --git a/windows/run_tests.bat b/windows/run_tests.bat index 5dadb05..916bef9 100644 --- a/windows/run_tests.bat +++ b/windows/run_tests.bat @@ -4,19 +4,17 @@ if [%PLATFORM%]==[] set PLATFORM=x86 if [%PREFERREDTOOLARCHITECTURE%]==[x64] set PLATFORM=x64 set PLATFORM=%PLATFORM:X=x% -if exist build_msvc12_%PLATFORM%\tests (cd build_msvc12_%PLATFORM%\tests) else ( - if exist ..\build_%PLATFORM%\tests (cd ..\build_msvc12_%PLATFORM%\tests) else ( - echo unable to find test dir - exit /b 1 - ) -) - - +rem if exist build_msvc12_%PLATFORM%\tests (cd build_msvc12_%PLATFORM%\tests) else ( +rem if exist ..\build_%PLATFORM%\tests (cd ..\build_msvc12_%PLATFORM%\tests) else ( +rem echo unable to find test dir +rem exit /b 1 +rem ) +rem ) for /f %%T in (testlist.txt) do ( set test=%%T set output=test: !test!.................................................................... - + echo !target! set target=%%~nT.exe if not exist !target! SET result=NotFound call !target! && (SET result=Passed) || (SET result=Failed) |