Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Out-of-tree builds skip test_embed on GitHub #93336

Closed
neonene opened this issue May 29, 2022 · 2 comments
Closed

Out-of-tree builds skip test_embed on GitHub #93336

neonene opened this issue May 29, 2022 · 2 comments
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error

Comments

@neonene
Copy link
Contributor

neonene commented May 29, 2022

Currently, out-of-tree builds pass test_embed.py without checking on a GHA (ubuntu). This issue can be linked to gh-89858 and may already be known.

Messages without -W test option:

test_audit (test.test_embed.AuditingTests.test_audit) ... skipped 
    "'/home/runner/work/cpython/cpython-builddir/Programs/_testembed' doesn't exist"

test_audit_run_command (test.test_embed.AuditingTests.test_audit_run_command) ... skipped
    "'/home/runner/work/cpython/cpython-builddir/Programs/_testembed' doesn't exist"

test_audit_run_file (test.test_embed.AuditingTests.test_audit_run_file) ... skipped
    "'/home/runner/work/cpython/cpython-builddir/Programs/_testembed' doesn't exist"
...

They come from support.REPO_ROOT below which points /home/runner/work/cpython/cpython-ro-srcdir. One test failure was left when I set /home/runner/work/cpython/cpython-builddir instead:

exepath = os.path.join(builddir, 'Programs')
expecteddir = os.path.join(support.REPO_ROOT, 'Programs')
self.test_exe = exe = os.path.join(exepath, exename)
if exepath != expecteddir or not os.path.exists(exe):
self.skipTest("%r doesn't exist" % exe)

TEST_SUPPORT_DIR = os.path.dirname(os.path.abspath(__file__))
TEST_HOME_DIR = os.path.dirname(TEST_SUPPORT_DIR)
STDLIB_DIR = os.path.dirname(TEST_HOME_DIR)
REPO_ROOT = os.path.dirname(STDLIB_DIR)

FAIL: test_init_pybuilddir (test.test_embed.InitConfigTests.test_init_pybuilddir)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_embed.py", line 1356, in test_init_pybuilddir
    self.check_all_configs("test_init_compat_config", config,
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_embed.py", line 801, in check_all_configs
    self.check_config(configs, expected_config)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/cpython/cpython-ro-srcdir/Lib/test/test_embed.py", line 727, in check_config
    self.assertEqual(config, expected)
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
AssertionError: {'_co[351 chars]'], 'xoptions': [], 'warnoptions': [], 'python[1304 chars]': 0} != {'_co[351 chars]'], 'orig_argv': [], 'xoptions': [], 'warnopti[1296 chars]': 0}
  {'_config_init': 1,
   '_init_main': 1,
   '_install_importlib': 1,
   '_isolated_interpreter': 0,
   'argv': [''],
   'base_exec_prefix': '/usr/local',
   'base_executable': '/tmp/tmp9etrf77o/_testembed',
   'base_prefix': '/usr/local',
   'buffered_stdio': 1,
   'bytes_warning': 0,
   'check_hash_pycs_mode': 'default',
   'code_debug_ranges': 1,
   'configure_c_stdio': 0,
   'dev_mode': 0,
   'dump_refs': 0,
   'exec_prefix': '/usr/local',
   'executable': '/tmp/tmp9etrf77o/_testembed',
   'faulthandler': 0,
   'hash_seed': 0,
   'home': None,
   'import_time': 0,
   'inspect': 0,
   'install_signal_handlers': 1,
   'interactive': 0,
   'isolated': 0,
   'malloc_stats': 0,
   'module_search_paths': ['/usr/local/lib/python312.zip',
                           '/home/runner/work/cpython/cpython-ro-srcdir/Lib',
                           '/home/runner/work/cpython/cpython-builddir/build/lib.linux-x86_64-3.12-pydebug',
                           '/usr/local/lib/python312.zip',
-                          '/tmp/cpython-ro-srcdir/Lib',
?                                ^ ^ ^ -----------

+                          '/tmp/tmp9etrf77o/Lib',
?                                ^^ ^^ ^^^^

                           '/tmp/tmp9etrf77o/libdir'],
   'module_search_paths_set': 1,
   'optimization_level': 0,
   'orig_argv': [],
   'parse_argv': 0,
   'parser_debug': 0,
   'pathconfig_warnings': 1,
   'platlibdir': 'lib',
   'prefix': '/usr/local',
   'program_name': './_testembed',
   'pycache_prefix': None,
   'pythonpath_env': '/usr/local/lib/python312.zip:/home/runner/work/cpython/cpython-ro-srcdir/Lib:/home/runner/work/cpython/cpython-builddir/build/lib.linux-x86_64-3.12-pydebug',
   'quiet': 0,
   'run_command': None,
   'run_filename': None,
   'run_module': None,
   'safe_path': 0,
   'show_ref_count': 0,
   'site_import': 1,
   'skip_source_first_line': 0,
-  'stdlib_dir': '/tmp/cpython-ro-srcdir/Lib',
+  'stdlib_dir': '/tmp/tmp9etrf77o/Lib',
   'tracemalloc': 0,
   'use_environment': 1,
-  'use_frozen_modules': 0,
?                        ^

+  'use_frozen_modules': False,
?                        ^^^^^

   'use_hash_seed': 0,
   'user_site_directory': 1,
   'verbose': 0,
   'warn_default_encoding': 0,
   'warnoptions': [],
   'write_bytecode': 1,
   'xoptions': []}
@neonene neonene added the type-bug An unexpected behavior, bug, or error label May 29, 2022
@hugovk hugovk added the tests Tests in the Lib/test dir label May 29, 2022
@erlend-aasland
Copy link
Contributor

Duplicate of gh-78436. Either we close this in favour of gh-78436, or the other way around.

@neonene
Copy link
Contributor Author

neonene commented May 31, 2022

Closing as duplicate. Thanks.

@neonene neonene closed this as completed May 31, 2022
@erlend-aasland erlend-aasland closed this as not planned Won't fix, can't repro, duplicate, stale May 31, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Tests in the Lib/test dir type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

No branches or pull requests

3 participants