curtin-dev team mailing list archive
-
curtin-dev team
-
Mailing list archive
-
Message #02852
Re: [Merge] ~dbungert/curtin:test-help into curtin:master
Diff comments:
> diff --git a/test-requirements.txt b/test-requirements.txt
> index 1970d03..0d93c02 100644
> --- a/test-requirements.txt
> +++ b/test-requirements.txt
> @@ -1,3 +1,6 @@
> +pip
> +wheel
> +virtualenv
Moved to test-requirements only, can ponder more later.
> jsonschema
> mock
> nose
> diff --git a/tests/integration/test_block_meta.py b/tests/integration/test_block_meta.py
> index d701ca0..d14a3f8 100644
> --- a/tests/integration/test_block_meta.py
> +++ b/tests/integration/test_block_meta.py
> @@ -257,7 +257,25 @@ class TestBlockMeta(IntegrationTestCase):
> '-c', config_path, 'block-meta', '--testmode', 'custom',
> *args,
> ]
> - util.subp(cmd, env=cmd_env, **kwargs)
> +
> + # Set debug=True to halt the integration test and run curtin manually,
> + # with the integration tests having setup the environment for you.
> + # Run tests with pytest-3 -s option.
> + if kwargs.pop('debug', False):
> + with tempfile.NamedTemporaryFile(mode='w', delete=False) as fp:
> + fp.write('#!/bin/bash\n')
> + for k, v in cmd_env.items():
> + fp.write('export {}="{}"\n'.format(k, v))
Dropping this change from the patch, we can discuss it. It isn't strictly required for later merges.
> + fp.write('export PYTHONPATH="{}"\n'.format(os.getcwd()))
> + fp.write(' '.join(cmd) + '\n')
> + os.chmod(fp.name, 0o700)
> + print()
> + print('The integration test is paused.')
> + print('Use script {} to run curtin manually.'.format(fp.name))
> + breakpoint()
> + os.unlink(fp.name)
> + else:
> + util.subp(cmd, env=cmd_env, **kwargs)
>
> def _test_default_offsets(self, ptable, version, sector_size=512):
> psize = 40 << 20
--
https://code.launchpad.net/~dbungert/curtin/+git/curtin/+merge/443376
Your team curtin developers is subscribed to branch curtin:master.
References