c_import: extract behavior tests that use @cImport
This introduces the new test step `test-c-import`, and removes the ability of the behavior tests to `@cImport` paths relative to `test`. This allows the behavior tests to be run without translate c.
This commit is contained in:
@@ -25,8 +25,7 @@ rm -rf zig-out
|
||||
cc -o bootstrap bootstrap.c
|
||||
./bootstrap
|
||||
./zig2 build -Dno-lib
|
||||
# In order to run these behavior tests we need to move the `@cImport` ones to somewhere else.
|
||||
# ./zig-out/bin/zig test test/behavior.zig
|
||||
./zig-out/bin/zig test test/behavior.zig
|
||||
|
||||
export CC="$ZIG cc -target $TARGET -mcpu=$MCPU"
|
||||
export CXX="$ZIG c++ -target $TARGET -mcpu=$MCPU"
|
||||
@@ -108,11 +107,11 @@ unset CXX
|
||||
|
||||
ninja install
|
||||
|
||||
stage3/bin/zig test ../test/behavior.zig -I../test
|
||||
stage3/bin/zig test ../test/behavior.zig
|
||||
stage3/bin/zig build -p stage4 \
|
||||
-Dstatic-llvm \
|
||||
-Dtarget=native-native-musl \
|
||||
-Dno-lib \
|
||||
--search-prefix "$PREFIX" \
|
||||
--zig-lib-dir "$(pwd)/../lib"
|
||||
stage4/bin/zig test ../test/behavior.zig -I../test
|
||||
stage4/bin/zig test ../test/behavior.zig
|
||||
|
||||
Reference in New Issue
Block a user