Skip to content

Commit 4849ccb

Browse files
Address review comments
1 parent 81d57b5 commit 4849ccb

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

test/runtests.py

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,17 @@
101101
if args.override_test_root:
102102
test_root = os.path.realpath(args.override_test_root)
103103

104-
# arch: x86, x64
105-
arch = 'x86' if args.x86 else ('x64' if args.x64 else ('arm' if args.arm else ('arm64' if args.arm64 else None)))
104+
# arch: x86, x64, arm, arm64
105+
arch = None
106+
if args.x86:
107+
arch = 'x86'
108+
elif args.x64:
109+
arch = 'x64'
110+
elif args.arm:
111+
arch = 'arm'
112+
elif args.arm64:
113+
arch = 'arm64'
114+
106115
if arch == None:
107116
arch = os.environ.get('_BuildArch', 'x86')
108117
if sys.platform != 'win32':
@@ -147,10 +156,10 @@
147156
if binary == None:
148157
if sys.platform == 'win32':
149158
build = "VcBuild.SWB" if args.swb else "VcBuild"
150-
binary = os.path.join('Build', build, 'bin', '{}_{}'.format(arch, flavor), binary_name)
159+
binary = os.path.join(repo_root, 'Build', build, 'bin', '{}_{}'.format(arch, flavor), binary_name)
151160
else:
152-
binary = os.path.join('out', '{0}'.format(flavor), binary_name)
153-
binary = os.path.join(repo_root, binary)
161+
binary = os.path.join(repo_root, 'out', flavor, binary_name)
162+
154163
if not os.path.isfile(binary):
155164
print('{} not found. Did you run ./build.sh already?'.format(binary))
156165
sys.exit(1)

0 commit comments

Comments
 (0)