ci: properly handle cross/native cases

pull/6161/head
Michael Hirsch, Ph.D 5 years ago
parent 554d35c3f3
commit 58b1157d87
No known key found for this signature in database
GPG Key ID: 6D23CDADAB0294F9
  1. 3
      test cases/common/229 native prop/crossfile.ini
  2. 5
      test cases/common/229 native prop/meson.build

@ -0,0 +1,3 @@
[properties]
astring = 'cross'
anarray = ['one', 'two']

@ -1,13 +1,14 @@
project('get prop')
x = meson.get_external_property('astring')
assert(x=='mystring', 'did not get native property string. did you use "meson setup --native-file native.txt"')
ref = meson.is_cross_build() ? 'cross' : 'mystring'
assert(x==ref, 'did not get native property string. did you use "meson setup --native-file native.txt"')
x = meson.get_external_property('astring', native: true)
assert(x=='mystring', 'did not get native property with native:true and non-cross build.')
x = meson.get_external_property('astring', 'fallback', native: false)
assert(x=='mystring', 'did not get get native property with native:false and non-cross build.')
assert(x==ref, 'did not get get native property with native:false and non-cross build.')
x = meson.get_external_property('notexist', 'fallback')

Loading…
Cancel
Save