Reject unreadable UCE source units
This commit is contained in:
@@ -54,6 +54,23 @@ if [[ "$(http_marker)" != *"dependency-marker-a"* ]]; then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
printf '%s\n' 'CLI(Request& context) { print("readable-source-marker"); }' >"$source_dir/unreadable.uce"
|
||||
chmod 000 "$source_dir/unreadable.uce"
|
||||
if unreadable_output=$(scripts/uce-cli "/$test_name/unreadable.uce" 2>&1); then
|
||||
echo "unreadable source unexpectedly compiled: $unreadable_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ "$unreadable_output" != *"source file is not readable"* ]]; then
|
||||
echo "unreadable source did not report its actual compile error: $unreadable_output" >&2
|
||||
exit 1
|
||||
fi
|
||||
if [[ -e "$cache_dir/unreadable.uce.wasm" ]]; then
|
||||
echo "unreadable source published a wasm artifact" >&2
|
||||
exit 1
|
||||
fi
|
||||
chmod 644 "$source_dir/unreadable.uce"
|
||||
assert_marker unreadable readable-source-marker
|
||||
|
||||
sed -i 's/dependency-marker-a/dependency-marker-b/' "$source_dir/child.uce"
|
||||
started_at=$(date +%s%N)
|
||||
http_during_rebuild=$(http_marker)
|
||||
|
||||
Reference in New Issue
Block a user