Skip to content

Commit 047fb2e

Browse files
committed
Enable extract_type_header regression tests
This test isn't strictly dependent on memory-analyzer being available, but is only of interest if that is the case.
1 parent d11492f commit 047fb2e

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

regression/CMakeLists.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,4 +78,5 @@ add_subdirectory(cpp-linter)
7878
if(WITH_MEMORY_ANALYZER)
7979
add_subdirectory(snapshot-harness)
8080
add_subdirectory(memory-analyzer)
81+
add_subdirectory(extract_type_header)
8182
endif()

regression/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,8 @@ endif
6464

6565
ifeq ($(WITH_MEMORY_ANALYZER),1)
6666
DIRS += snapshot-harness \
67-
memory-analyzer
67+
memory-analyzer \
68+
extract_type_header
6869
endif
6970

7071
# Run all test directories in sequence
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
if(WIN32)
2+
set(is_windows true)
3+
else()
4+
set(is_windows false)
5+
endif()
6+
7+
add_test_pl_tests(
8+
"${CMAKE_CURRENT_SOURCE_DIR}/chain.sh $<TARGET_FILE:goto-cc> $<TARGET_FILE:goto-instrument> $<TARGET_FILE:cbmc> ../../../scripts/extract_type_header.py ${is_windows}"
9+
)

regression/extract_type_header/chain.sh

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ name=${name%.c}
1414
args=${*:6:$#-6}
1515

1616
if [[ "${is_windows}" == "true" ]]; then
17-
$goto_cc "${name}.c"
18-
mv "${name}.exe" "${name}.gb"
17+
$goto_cc "${name}.c" "/Fe${name}.gb"
1918
else
2019
$goto_cc -o "${name}.gb" "${name}.c"
2120
fi
2221

23-
export PATH=$PATH:"$(pwd)../../../src/goto-instrument/"
22+
export PATH=$PATH:"$(cd $(dirname $goto_instrument) && pwd)"
2423
$python_script "${name}.gb" "${name}.c" "header.h"
2524
cat "header.h"
2625
rm -f "header.h"

0 commit comments

Comments
 (0)