mirror of
https://github.com/GaloisInc/cryptol.git
synced 2024-12-28 02:15:31 +03:00
FFI: Print whether FFI is enabled in -v/:v command
This commit is contained in:
parent
9efd822614
commit
59f0b30a0c
7
.github/workflows/ci.yml
vendored
7
.github/workflows/ci.yml
vendored
@ -153,7 +153,12 @@ jobs:
|
||||
cmd="cat \$1.stdout.mingw32 2>/dev/null || $cmd"
|
||||
fi
|
||||
./bin/test-runner --ext=.icry -r ./output --exe=$(which bash) -F -c -F "$cmd" -F -- ./tests
|
||||
TARGETS_JSON=$(echo -n "$(ls -1 ./output/tests)" | jq -Rsc 'split("\n")')
|
||||
if cabal v2-exec cryptol -- -v | grep -q 'FFI enabled'; then
|
||||
filter="cat"
|
||||
else
|
||||
filter="grep -v ffi"
|
||||
fi
|
||||
TARGETS_JSON=$(echo -n "$(ls -1 ./output/tests)" | $filter | jq -Rsc 'split("\n")')
|
||||
echo "::set-output name=targets-json::$TARGETS_JSON"
|
||||
|
||||
- shell: bash
|
||||
|
14
cry
14
cry
@ -79,11 +79,21 @@ case $COMMAND in
|
||||
test)
|
||||
echo Running tests
|
||||
setup_external_tools
|
||||
if [ "$#" == "0" ]; then TESTS=tests; else TESTS=$*; fi
|
||||
if [ "$#" == "0" ]; then
|
||||
if cabal v2-exec cryptol -- -v | grep -q 'FFI enabled'; then
|
||||
TESTS=(tests/*)
|
||||
else
|
||||
GLOBIGNORE="tests/ffi"
|
||||
TESTS=(tests/*)
|
||||
unset GLOBIGNORE
|
||||
fi
|
||||
else
|
||||
TESTS=("$*")
|
||||
fi
|
||||
$BIN/test-runner --ext=.icry \
|
||||
--exe=cabal \
|
||||
-F v2-run -F -v0 -F exe:cryptol -F -- -F -b \
|
||||
$TESTS
|
||||
"${TESTS[@]}"
|
||||
;;
|
||||
|
||||
rpc-test)
|
||||
|
@ -6,6 +6,7 @@
|
||||
-- Stability : provisional
|
||||
-- Portability : portable
|
||||
|
||||
{-# LANGUAGE CPP #-}
|
||||
{-# LANGUAGE Safe #-}
|
||||
|
||||
module Cryptol.Version (
|
||||
@ -39,6 +40,9 @@ displayVersion putLn = do
|
||||
putLn ("Cryptol " ++ ver)
|
||||
putLn ("Git commit " ++ commitHash)
|
||||
putLn (" branch " ++ commitBranch ++ dirtyLab)
|
||||
#ifdef FFI_ENABLED
|
||||
putLn "FFI enabled"
|
||||
#endif
|
||||
where
|
||||
dirtyLab | commitDirty = " (non-committed files present during build)"
|
||||
| otherwise = ""
|
||||
|
Loading…
Reference in New Issue
Block a user