Skip to content

Commit 9f3e893

Browse files
author
Aleksandra Pasek
committed
Merge branch 'topic/SKIP-python-test-and-add-copy-files-on-target' into 'master'
Testsuite: use copy_files_on_target run_cross option See merge request eng/toolchain/gnatcoll-core!32
2 parents c0068df + 4b4334d commit 9f3e893

File tree

4 files changed

+11
-4
lines changed

4 files changed

+11
-4
lines changed

testsuite/drivers/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ def gprbuild(driver,
160160

161161

162162
def bin_check_call(driver, cmd, slot, test_name=None, result=None, timeout=None,
163-
env=None, cwd=None, **kwargs):
163+
env=None, cwd=None, copy_files_on_target=None, **kwargs):
164164
if cwd is None and "working_dir" in driver.test_env:
165165
cwd = driver.test_env["working_dir"]
166166
if result is None:
@@ -178,6 +178,7 @@ def bin_check_call(driver, cmd, slot, test_name=None, result=None, timeout=None,
178178
timeout=timeout,
179179
output=None,
180180
slot=slot,
181+
copy_files_on_target=copy_files_on_target,
181182
)
182183

183184
# Here process.out holds utf-8 encoded data.

testsuite/drivers/basic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,12 @@ def run(self):
5252
gprbuild(self, gpr_project_path=gpr_project_path)
5353

5454
# Copy the requested data files
55+
copy_files_on_target = []
56+
5557
for data in self.test_env.get('data', []):
5658
cp(os.path.join(self.test_env['test_dir'], data),
5759
self.test_env['working_dir'], recursive=True)
60+
copy_files_on_target.append(os.path.join(self.test_env['working_dir'], data))
5861

5962
pre_test_py = os.path.join(self.test_env['test_dir'], 'pre_test.py')
6063
if os.path.isfile(pre_test_py):
@@ -67,7 +70,8 @@ def run(self):
6770
process = run_test_program(
6871
self,
6972
[os.path.join(self.test_env['working_dir'], test_exe)],
70-
self.slot,
73+
slot=self.slot,
74+
copy_files_on_target=copy_files_on_target,
7175
timeout=self.default_process_timeout)
7276
self.output += process.out.decode('utf-8')
7377

testsuite/drivers/valgrind.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from drivers import bin_check_call
22

33

4-
def check_call_valgrind(driver, cmd, test_name=None, result=None, **kwargs):
4+
def check_call_valgrind(driver, cmd, slot, test_name=None, result=None, **kwargs):
55
"""
66
Wrapper for `e3.testsuite.process` that runs the process under Valgrind if
77
this is a Valgrind-checked testsuite run. The process exit status will be
@@ -10,4 +10,4 @@ def check_call_valgrind(driver, cmd, test_name=None, result=None, **kwargs):
1010
if driver.env.valgrind:
1111
cmd = ['valgrind', '-q', '--error-exitcode=2',
1212
'--leak-check=full'] + cmd
13-
return bin_check_call(driver, cmd, test_name, result, **kwargs)
13+
return bin_check_call(driver, cmd, slot, test_name, result, **kwargs)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
11
title: GNATCOLL.OS.Process test inherit_env parameter
22
data: ["test_data/*.py"]
3+
control:
4+
- [SKIP, "env.is_cross", "Test uses python which is not available on cross targets"]

0 commit comments

Comments
 (0)