Skip to content
Open
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
2 changes: 2 additions & 0 deletions tests/utils/bazel/constants.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,6 @@

# Default installation prefix for test binaries on target systems.
# Change this value to relocate all test binaries to a different base path.
# Note that if any directory other than /tmp is used, you must also use the
# --sandbox_writable_path=/your/test/path argument
SCORE_TEST_INSTALL_PREFIX = "/tmp"
2 changes: 1 addition & 1 deletion tests/utils/plugins/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ This will deploy the files into the directory `/tmp` on your host machine.
So before running please create those directories with permissions so that your
user can write to those directories.
Note that bazel mounts the `/tmp` directory inside of the sandbox so you will
not see the files inside the `/tmp` directory.
not see the files inside the `/tmp` directory unless you use `--sandbox_add_mount_pair=/tmp`.
2 changes: 2 additions & 0 deletions tests/utils/plugins/localhost.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ def upload(self, local_path: str, remote_path: str) -> None:
dest = Path(remote_path)
dest.parent.mkdir(parents=True, exist_ok=True)
shutil.copy2(local_path, dest)
# If a .tar is left over, this allows the next run to remove it
os.chmod(dest, 0o777)

def download(self, remote_path: str, local_path: str) -> None:
Path(local_path).parent.mkdir(parents=True, exist_ok=True)
Expand Down
2 changes: 1 addition & 1 deletion tests/utils/testing_utils/setup_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ def setup_test(request, target):
bin_path = Path(request.config.getoption("--score-test-binary-path"))
remote_dir = Path(request.config.getoption("--score-test-remote-directory"))

extract_dir = Path("/") / remote_dir.parts[1] # e.g. /tmp
extract_dir = remote_dir.parent.parent # e.g. /tmp
remote_tar = extract_dir / bin_path.name

res, _ = target.execute(f"mkdir -p {extract_dir}")
Expand Down
Loading