Convert all test from the python3 module to python.

killpy3
Jussi Pakkanen 3 years ago
parent 93ed7531c4
commit 1695ff83be
  1. 2
      test cases/common/106 multiple dir configure file/subdir/meson.build
  2. 2
      test cases/common/109 custom target capture/meson.build
  3. 2
      test cases/common/128 build by default targets in tests/meson.build
  4. 4
      test cases/common/129 build by default/meson.build
  5. 2
      test cases/common/139 mesonintrospect from scripts/meson.build
  6. 2
      test cases/common/14 configure file/meson.build
  7. 2
      test cases/common/141 special characters/meson.build
  8. 4
      test cases/common/143 list of file sources/meson.build
  9. 2
      test cases/common/150 reserved targets/meson.build
  10. 4
      test cases/common/152 index customtarget/meson.build
  11. 2
      test cases/common/242 custom target feed/meson.build
  12. 2
      test cases/common/33 run program/meson.build
  13. 2
      test cases/common/95 manygen/subdir/meson.build
  14. 2
      test cases/common/97 find program path/meson.build
  15. 2
      test cases/csharp/2 library/meson.build
  16. 2
      test cases/failing/57 assign custom target index/meson.build
  17. 4
      test cases/frameworks/11 gir subproject/meson.build
  18. 6
      test cases/frameworks/7 gnome/meson.build
  19. 2
      test cases/frameworks/7 gnome/resources-data/meson.build
  20. 6
      test cases/unit/46 native file binary/meson.build
  21. 3
      unittests/machinefiletests.py

@ -3,7 +3,7 @@ configure_file(input : 'someinput.in',
install : false,
copy: true)
py3 = import('python3').find_python()
py3 = import('python').find_installation()
cfile1 = configure_file(input : 'foo.txt',
output : 'foo.h.in',

@ -1,6 +1,6 @@
project('custom target', 'c')
python3 = import('python3').find_python()
python3 = import('python').find_installation()
# Note that this will not add a dependency to the compiler executable.
# Code will not be rebuilt if it changes.

@ -19,5 +19,5 @@ if not os.path.exists(sys.argv[1]) or not os.path.exists(sys.argv[2]):
"".format(sys.argv[1], sys.argv[2], os.getcwd()))
sys.exit(1)'''
python = import('python3').find_python()
python = import('python').find_installation()
test('output-check', python, args : ['-c', py_file_exists, foo_out, exe_out])

@ -1,7 +1,7 @@
project('build on all', 'c')
py3_mod = import('python3')
py3 = py3_mod.find_python()
py_mod = import('python')
py3 = py_mod.find_installation()
executable('fooprog', 'foo.c',
build_by_default : false,

@ -1,6 +1,6 @@
project('mesonintrospect from scripts', 'c')
python = import('python3').find_python()
python = import('python').find_installation()
ret = run_command(python, ['check_env.py', '1'], check: false)
if ret.returncode() == 0

@ -29,7 +29,7 @@ configure_file(input : files('config.h.in'),
configuration : conf)
# Now generate a header file with an external script.
genprog = import('python3').find_python()
genprog = import('python').find_installation()
scriptfile = '@0@/generator.py'.format(meson.current_source_dir())
ifile = '@0@/dummy.dat'.format(meson.current_source_dir())
ofile = '@0@/config2.h'.format(meson.current_build_dir())

@ -1,6 +1,6 @@
project('ninja special characters' ,'c')
python = import('python3').find_python()
python = import('python').find_installation()
# Without newlines, this should appear directly in build.ninja.
gen = custom_target('gen',

@ -1,7 +1,7 @@
project('test', 'c')
mod_py = import('python3')
python = mod_py.find_python()
mod_py = import('python')
python = mod_py.find_installation()
test_target = custom_target(
'test_target',

@ -26,7 +26,7 @@ subdir('uninstall')
subdir('runtarget')
py3 = import('python3').find_python()
py3 = import('python').find_installation()
custom_target('ctlist-test', output : 'out.txt',
command : [py3, '-c', 'print("")'],

@ -14,8 +14,8 @@
project('custom_target_index', 'c', default_options : 'c_std=c89')
py_mod = import('python3')
prog_python = py_mod.find_python()
py_mod = import('python')
prog_python = py_mod.find_installation()
gen = custom_target(
'gen.[ch]',

@ -1,6 +1,6 @@
project('custom target feed', 'c')
python3 = import('python3').find_python()
python3 = import('python').find_installation()
# Note that this will not add a dependency to the compiler executable.
# Code will not be rebuilt if it changes.

@ -55,7 +55,7 @@ if c.returncode() != 0
error('Using files() in argument failed.')
endif
py3 = import('python3').find_python()
py3 = import('python').find_installation()
ret = run_command(py3, '-c', 'print("some output")', check: false)
assert(ret.returncode() == 0, 'failed to run python3: ' + ret.stderr())

@ -1,5 +1,5 @@
gen = files('manygen.py')
py3_bin = import('python3').find_python()
py3_bin = import('python').find_installation()
buildtype = get_option('buildtype')
buildtype_args = '-Dfooxxx' # a useless compiler argument

@ -1,6 +1,6 @@
project('find program', 'c')
python = import('python3').find_python()
python = import('python').find_installation()
# Source file via string
prog = find_program('program.py')

@ -1,6 +1,6 @@
project('C# library', 'cs')
python3 = import('python3').find_python()
python3 = import('python').find_installation()
generated_sources = custom_target('gen_sources',
input: 'helper.cs',
output: 'helper.cs',

@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
prog_python = import('python3').find_python()
prog_python = import('python').find_installation()
target = custom_target(
'target',

@ -5,8 +5,8 @@ if not gir.found()
error('MESON_SKIP_TEST g-ir-scanner not found.')
endif
python3 = import('python3')
py3 = python3.find_python()
python3 = import('python')
py3 = python3.find_installation()
if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0
error('MESON_SKIP_TEST python3-gi not found')
endif

@ -10,8 +10,8 @@ if not gir.found()
error('MESON_SKIP_TEST gobject-introspection not found.')
endif
python3 = import('python3')
py3 = python3.find_python()
python3 = import('python')
py3 = python3.find_installation()
if run_command(py3, '-c', 'import gi;', check: false).returncode() != 0
error('MESON_SKIP_TEST python3-gi not found')
endif
@ -25,7 +25,7 @@ if cc.get_id() == 'intel'
add_global_arguments('-wd2282', language : 'c')
endif
py3 = import('python3').find_python()
py3 = import('python').find_installation()
pycode = '''import os, sys
if "MESON_UNIT_TEST_PRETEND_GLIB_OLD" in os.environ:
sys.exit(0)

@ -1,6 +1,6 @@
subdir('subdir')
python3 = import('python3').find_python()
python3 = import('python').find_installation()
fake_generator_script = '''
import os, sys

@ -10,12 +10,10 @@ elif case == 'config_dep'
add_languages('cpp')
dep = dependency('llvm', method : 'config-tool')
assert(dep.get_configtool_variable('version').endswith('12345'), 'Didn\'t load llvm from config file')
elif case == 'python3'
prog = import('python3').find_python()
result = run_command(prog, ['--version'], check: true)
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python3 from config file')
elif case == 'python'
prog = import('python').find_installation()
result = run_command(prog, ['--version'], check: true)
assert(result.stdout().strip().endswith('12345'), 'Didn\'t load python from config file')
else
error('Unknown case ' + case)
endif

@ -207,9 +207,6 @@ class NativeFileTests(BasePlatformTests):
raise SkipTest('No llvm-installed, cannot test')
self._simple_test('config_dep', 'llvm-config')
def test_python3_module(self):
self._simple_test('python3', 'python3')
def test_python_module(self):
if is_windows():
# Bat adds extra crap to stdout, so the version check logic in the

Loading…
Cancel
Save