Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion .bazelci/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ win_tests: &win_tests
- "//pkg/..."
- "//tests/..."
- "//toolchains/..."
- "-//tests:package_naming_aggregate_test"
# Bazel might be broken w.r.t. Unicode processing for windows. Multiple issues:
# https://github.com/bazelbuild/bazel/issues?q=is%3Aissue+is%3Aopen+%2Bunicode+%2Bwindows+
- "-//tests/mappings:utf8_manifest_test"
Expand Down
14 changes: 11 additions & 3 deletions tests/package_naming_aggregate_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,22 @@

# This test simply checks that when we create packages with package_file_name
# that we get the expected file names.
set -e
set -euo pipefail

# Minimalistic `rlocation`: https://github.com/bazelbuild/rules_shell/blob/main/shell/runfiles/runfiles.bash
locate() {
if [ -n "${RUNFILES_MANIFEST_FILE:-}" ]; then
grep -m1 "^$1 " "$RUNFILES_MANIFEST_FILE" | cut -d' ' -f2-
else
echo "$TEST_SRCDIR/$1"
fi
}

# Portably find the absolute path to the test data, even if this code has been
# vendored in to a source tree and re-rooted.
TEST_PACKAGE="$(echo ${TEST_TARGET} | sed -e 's/:.*$//' -e 's@//@@')"
declare -r DATA_DIR="${TEST_SRCDIR}/${TEST_WORKSPACE}/${TEST_PACKAGE}"

for pkg in test_naming_some_value.deb test_naming_some_value.tar test_naming_some_value.zip ; do
ls -l "${DATA_DIR}/$pkg"
ls -l "$(locate "$TEST_WORKSPACE/$TEST_PACKAGE/$pkg")"
done
echo "PASS"