diff options
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | ldmicro/CMakeLists.txt | 15 | ||||
-rw-r--r-- | ldmicro/lib/linuxUI/linuxLD.cpp | 4 | ||||
-rw-r--r-- | ldmicro/reg/go.bat | 1 | ||||
-rw-r--r-- | ldmicro/reg/run-tests.pl | 2 |
5 files changed, 17 insertions, 8 deletions
@@ -4,4 +4,5 @@ /ldmicro/obj/* !/ldmicro/obj/dummy /ldmicro/testMain.cpp -/ldmicro/includes/testMain.h
\ No newline at end of file +/ldmicro/reg/results/* +/ldmicro/includes/testMain.h diff --git a/ldmicro/CMakeLists.txt b/ldmicro/CMakeLists.txt index aeb706f..11097c9 100644 --- a/ldmicro/CMakeLists.txt +++ b/ldmicro/CMakeLists.txt @@ -116,6 +116,10 @@ IF(UNIX) maincontrols.cpp ldmicro.cpp) + ## Build *.int interpreter + add_executable (ldinterpret ldinterpret.c) + target_link_libraries (ldinterpret LinuxUI) + ## Build main LDMicro executable add_executable (LDMicro ${COMPILE_CPP_SOURCES}) add_dependencies(LDMicro LDMicro_SCRIPT_GENERATED_FILES) @@ -123,7 +127,12 @@ IF(UNIX) target_link_libraries (LDMicro LinuxUI) target_link_libraries (LDMicro FreezeLD) - ## Build *.int interpreter - add_executable (ldinterpret ldinterpret.c) - target_link_libraries (ldinterpret LinuxUI) + ## Add tests + MESSAGE( STATUS "Adding tests.." ) + add_custom_command( + TARGET LDMicro + POST_BUILD + WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/reg + COMMAND perl run-tests.pl) + ENDIF(UNIX)
\ No newline at end of file diff --git a/ldmicro/lib/linuxUI/linuxLD.cpp b/ldmicro/lib/linuxUI/linuxLD.cpp index e4fd018..cd53da1 100644 --- a/ldmicro/lib/linuxUI/linuxLD.cpp +++ b/ldmicro/lib/linuxUI/linuxLD.cpp @@ -25,7 +25,7 @@ LPVOID HeapAlloc(HANDLE hHeap, DWORD dwFlags, SIZE_T dwBytes) { if (hHeap == NULL) { - printf("Alloc**********NULL HEAP***************\n"); + // printf("Alloc**********NULL HEAP***************\n"); LPVOID p = malloc(dwBytes); return p; } @@ -73,7 +73,7 @@ BOOL HeapFree(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem) /// if NULL free() if (hHeap == NULL) { - printf("free*********NULL HEAP***************\n"); + // printf("free*********NULL HEAP***************\n"); free(lpMem); return TRUE; } diff --git a/ldmicro/reg/go.bat b/ldmicro/reg/go.bat deleted file mode 100644 index 5338cea..0000000 --- a/ldmicro/reg/go.bat +++ /dev/null @@ -1 +0,0 @@ -@perl run-tests.pl diff --git a/ldmicro/reg/run-tests.pl b/ldmicro/reg/run-tests.pl index 91e81b8..94d5ed0 100644 --- a/ldmicro/reg/run-tests.pl +++ b/ldmicro/reg/run-tests.pl @@ -12,7 +12,7 @@ for $test (<tests/*.ld>) { unlink $output; - $cmd = "../ldmicro.exe /c $test $output"; + $cmd = "../build/LDMicro /c $test $output"; system $cmd; $c++; } |