diff options
Diffstat (limited to 'test/run-test-build.py')
-rwxr-xr-x | test/run-test-build.py | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/test/run-test-build.py b/test/run-test-build.py index aa2cde1767..dd0a89c88b 100755 --- a/test/run-test-build.py +++ b/test/run-test-build.py @@ -22,6 +22,7 @@ It is intended to be used only from soong genrule. import argparse, os, shutil, subprocess, glob, re, json, multiprocessing, pathlib, fcntl import art_build_rules from importlib.machinery import SourceFileLoader +from os.path import join, basename import art_build_rules @@ -42,22 +43,8 @@ class BuildTestContext: def copy_sources(args, tmp, mode, srcdir): """Copy test files from Android tree into the build sandbox and return its path.""" - join = os.path.join - test = os.path.basename(srcdir) - dstdir = join(tmp, mode, test) - - # Copy all source files to the temporary directory. + dstdir = join(tmp, mode, basename(srcdir)) shutil.copytree(srcdir, dstdir) - - # Copy the default scripts if the test does not have a custom ones. - for name in ["run"]: - src, dst = f"art/test/etc/default-{name}", join(dstdir, name) - if os.path.exists(dst): - shutil.copy2(src, dstdir) # Copy default script next to the custom script. - else: - shutil.copy2(src, dst) # Use just the default script. - os.chmod(dst, 0o755) - return dstdir def build_test(args, mode, build_top, sbox, dstdir): |