Fixed cross compilation back up.

pull/15/head
Jussi Pakkanen 11 years ago
parent 11cfb3ce22
commit 92ff302a14
  1. 9
      interpreter.py
  2. 4
      meson_test.py
  3. 7
      test cases/common/25 numbers/meson.build
  4. 10
      test cases/common/25 numbers/prog.c

@ -243,16 +243,9 @@ class Host(InterpreterObject):
def __init__(self, envir):
InterpreterObject.__init__(self)
self.environment = envir
self.methods.update({'pointer_size' : self.get_ptrsize_method,
'name' : self.get_name_method,
self.methods.update({'name' : self.get_name_method,
'is_big_endian' : self.is_big_endian_method,
})
# Is this needed any more since we have proper compiler
# based tests? Consider removing it.
def get_ptrsize_method(self, args, kwargs):
if sys.maxsize > 2**32:
return 64
return 32
def get_name_method(self, args, kwargs):
if self.environment.is_cross_build():

@ -47,7 +47,7 @@ def run_single_test(wrap, test):
# because there is no execute wrapper.
cmd = None
else:
cmd = [exe_runner, test.fname]
cmd = [test.exe_runner, test.fname]
else:
cmd = [test.fname]
if cmd is None:
@ -114,7 +114,7 @@ def run_tests(options, datafilename):
if not test.is_parallel:
drain_futures(futures)
futures = []
res = run_single_test(wrap, t)
res = run_single_test(wrap, test)
print_stats(numlen, tests, test.name, res, i, logfile)
else:
f = executor.submit(run_single_test, wrap, test)

@ -1,7 +0,0 @@
project('numbers', 'c')
if host.pointer_size() == 64
add_global_arguments('-DIS64', language : 'c')
endif
test('sizetest', executable('prog', 'prog.c'))

@ -1,10 +0,0 @@
int main(int argc, char **argv) {
int ptrsize = sizeof(void*);
int expsize;
#ifdef IS64
expsize = 8;
#else
expsize = 4;
#endif
return ptrsize == expsize ? 0 : 1;
}
Loading…
Cancel
Save