This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
umask 022
|
||||
PATH=/usr/bin:/bin:/usr/sbin:/sbin
|
||||
export PATH
|
||||
|
||||
|
||||
+17
-2
@@ -47,7 +47,7 @@ expect_path_rejected "outside the repository" \
|
||||
--output "$WORK/repository-alias/core/forbidden-output" \
|
||||
--target-dir "$WORK/parents/repository-alias-target"
|
||||
|
||||
"$BUILDER" --output "$WORK/one" --target-dir "$WORK/target-one"
|
||||
(umask 022 && "$BUILDER" --output "$WORK/one" --target-dir "$WORK/target-one")
|
||||
mkdir "$WORK/hostile-bin"
|
||||
mkdir -p "$WORK/hostile-cargo-home" "$WORK/hostile-home/.cargo"
|
||||
ln -s /usr/bin/false "$WORK/hostile-bin/cargo"
|
||||
@@ -61,7 +61,9 @@ cat >"$WORK/hostile-home/.cargo/config.toml" <<'EOF'
|
||||
[build]
|
||||
rustc = "/usr/bin/false"
|
||||
EOF
|
||||
env \
|
||||
(
|
||||
umask 077
|
||||
env \
|
||||
AR=/usr/bin/false \
|
||||
CARGO_BUILD_RUSTC=/usr/bin/false \
|
||||
CARGO_BUILD_RUSTC_WRAPPER=/usr/bin/false \
|
||||
@@ -80,6 +82,7 @@ env \
|
||||
"$BUILDER" \
|
||||
--output "$WORK/parent-alias/two" \
|
||||
--target-dir "$WORK/parents/target-two"
|
||||
)
|
||||
|
||||
framework_one="$WORK/one/VerseVDICore.xcframework"
|
||||
framework_two="$WORK/physical-parent/two/VerseVDICore.xcframework"
|
||||
@@ -185,6 +188,18 @@ sha256_file() {
|
||||
canonical_tree "$framework_one" >"$WORK/one.tree"
|
||||
canonical_tree "$framework_two" >"$WORK/two.tree"
|
||||
cmp "$WORK/one.tree" "$WORK/two.tree"
|
||||
canonical_tree "$WORK/one" >"$WORK/one.output-tree"
|
||||
canonical_tree "$WORK/physical-parent/two" >"$WORK/two.output-tree"
|
||||
cmp "$WORK/one.output-tree" "$WORK/two.output-tree"
|
||||
for directory in \
|
||||
"$WORK/one" \
|
||||
"$WORK/target-one" \
|
||||
"$framework_one" \
|
||||
"$WORK/physical-parent/two" \
|
||||
"$WORK/parents/target-two" \
|
||||
"$framework_two"; do
|
||||
test "$(stat -f '%Sp' "$directory")" = drwxr-xr-x
|
||||
done
|
||||
test "$(sha256_file "$library_one")" = "$(sha256_file "$library_two")"
|
||||
|
||||
source_epoch=$(git -C "$ROOT" show -s --format=%ct HEAD)
|
||||
|
||||
Reference in New Issue
Block a user