[Qa-jenkins-scm] Build failed in Jenkins: reproducible_reprotest_from_git_master #69

jenkins at jenkins.debian.net jenkins at jenkins.debian.net
Fri Sep 22 14:39:19 UTC 2017


See <https://jenkins.debian.net/job/reproducible_reprotest_from_git_master/69/display/redirect?page=changes>

Changes:

[infinity0] main: pull traceback-printing stuff out of the core code

------------------------------------------
[...truncated 242.23 KB...]
Finished running lintian.
=======================
Reproduction successful
=======================
No differences in ../*.deb
45b25468943d782d791a3b6d936313e2ad6c94b9d7afc70e2013d8dd348c03aa  ../reprotest_0.7_all.deb
.usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: null -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: null -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: null -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: null -d
usage: reprotest --help [<virtual_server_name>]
       reprotest [options] [-c <build-command>] <source_root> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
       reprotest [options] [-s <source_root>] <build_command> [<artifact_pattern>]
                 [-- <virtual_server_args> [<virtual_server_args> ...]]
reprotest: error: unrecognized arguments: -d
WARNING:root:old CLI form `reprotest auto <source_root>` detected, setting source_root to the second argument: .
WARNING:root:to avoid this warning, use instead `reprotest <source_root>` or (if really necessary) `reprotest -s <source_root> auto <artifact>`
.
tests/test_shell.py ..

=================================== FAILURES ===================================
___________________________ test_simple_builds[null] ___________________________

command = 'python3 mock_failure.py', virtual_server = ['null'], code = 2

    def check_return_code(command, virtual_server, code):
        try:
            build_variations = reprotest.build.Variations.of(
                reprotest.build.VariationSpec.default(TEST_VARIATIONS))
            retcode = reprotest.check(command, 'tests', 'artifact',
>               virtual_server_args=virtual_server, build_variations=build_variations)

tests/test_reprotest.py:26: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

build_command = 'python3 mock_failure.py', source_root = 'tests'
artifact_pattern = 'artifact', store_dir = None, no_clean_on_error = False
virtual_server_args = ['null'], testbed_pre = None, testbed_init = None
host_distro = 'debian'
build_variations = [('control', Variations(spec=VariationSpec(), verbosity=0)), ('experiment-1', Variations(spec=VariationSpec(build_path...rue, time=TimeVariation(faketimes=[], auto_faketimes=['SOURCE_DATE_EPOCH']), timezone=True, umask=True), verbosity=0))]
diffoscope_args = []

    def check(build_command, source_root, artifact_pattern, store_dir=None, no_clean_on_error=False,
              virtual_server_args=[], testbed_pre=None, testbed_init=None, host_distro='debian',
              build_variations=Variations.of(VariationSpec.default()), diffoscope_args=[]):
        # default argument [] is safe here because we never mutate it.
        with empty_or_temp_dir(store_dir, "store_dir") as result_dir:
            assert store_dir == result_dir or store_dir is None
            proc = corun_builds(
                build_command, source_root, artifact_pattern, result_dir, no_clean_on_error,
                virtual_server_args, testbed_pre, testbed_init, host_distro)
    
>           local_dists = [proc.send(nv) for nv in build_variations]

reprotest/__init__.py:265: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

.0 = <list_iterator object at 0x7f5f9edbba90>

>   local_dists = [proc.send(nv) for nv in build_variations]

reprotest/__init__.py:265: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

build_command = 'python3 mock_failure.py', source_root = 'tests'
artifact_pattern = './artifact', result_dir = '/tmp/tmp4_zck8v8'
no_clean_on_error = False, virtual_server_args = ['null'], testbed_pre = None
testbed_init = None, host_distro = 'debian'

    @coroutine
    def corun_builds(build_command, source_root, artifact_pattern, result_dir, no_clean_on_error,
                     virtual_server_args, testbed_pre, testbed_init, host_distro):
        """A coroutine for running the builds.
    
        .>>> proc = corun_builds(...)
        .>>> for name, var in variations:
        .>>>     local_dist = proc.send((name, var))
        .>>>     ...
        """
        if not source_root:
            raise ValueError("invalid source root: %s" % source_root)
        if os.path.isfile(source_root):
            source_root = os.path.normpath(os.path.dirname(source_root))
        source_root = str(source_root)
    
        artifact_pattern = shell_syn.sanitize_globs(artifact_pattern)
        logging.debug("artifact_pattern sanitized to: %s", artifact_pattern)
        logging.debug("virtual_server_args: %r", virtual_server_args)
    
        # TODO: if no_clean_on_error then this shouldn't be rm'd
        with tempfile.TemporaryDirectory() as temp_dir:
            if testbed_pre:
                new_source_root = os.path.join(temp_dir, "testbed_pre")
                shutil.copytree(source_root, new_source_root, symlinks=True)
                subprocess.check_call(["sh", "-ec", testbed_pre], cwd=new_source_root)
                source_root = new_source_root
            logging.debug("source_root: %s", source_root)
    
            # TODO: an alternative strategy is to run the testbed many times, one for each build
            # not sure if it's worth implementing at this stage, but perhaps in the future.
            with start_testbed(virtual_server_args, temp_dir, no_clean_on_error,
                               host_distro=host_distro) as testbed:
                name_variation = yield
    
                while name_variation:
                    name, var = name_variation
                    var = var._replace(spec=var.spec.apply_dynamic_defaults(source_root))
                    bctx = BuildContext(testbed.scratch, result_dir, source_root, name, var)
    
                    build = bctx.make_build_commands(
                        'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; ' + build_command, os.environ)
                    logging.log(5, "build %s: %r", name, build)
                    build = bctx.plan_variations(build)
                    logging.log(5, "build %s: %r", name, build)
    
                    if testbed_init:
                        testbed.check_exec(["sh", "-ec", testbed_init])
    
                    bctx.copydown(testbed)
>                   bctx.run_build(testbed, build, artifact_pattern)

reprotest/__init__.py:235: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = BuildContext(testbed_root='/tmp/autopkgtest.OqwEWK', local_dist_root='/tmp/tmp4_zck8v8', local_src='tests', build_name='control', variations=Variations(spec=VariationSpec(), verbosity=0))
testbed = <reprotest.lib.adt_testbed.Testbed object at 0x7f5f9edbb0b8>
build = Build(build_command=SimpleCommand(cmd_prefix='', cmd_name='linux64', cmd_suffix=CmdSuffix('--uname-2.6', SimpleCommand...st_simple_builds[null] (call)', 'http_proxy': 'http://127.0.9.1:9'}), tree='/tmp/autopkgtest.OqwEWK/const_build_path/')
artifact_pattern = './artifact'

    def run_build(self, testbed, build, artifact_pattern):
        logging.info("starting build with source directory: %s, artifact pattern: %s",
            self.testbed_src, artifact_pattern)
        # remove any existing artifact, in case the build script doesn't overwrite
        # it e.g. like how make(1) sometimes works.
        testbed.check_exec(
            ['sh', '-ec', 'cd "%s" && rm -rf %s' %
            (self.testbed_src, artifact_pattern)])
        # this dance is necessary because the cwd can't be cd'd into during the setup phase under some variations like user_group
        new_script = build.append_setup_exec_raw('export', 'REPROTEST_BUILD_PATH=%s' % build.tree).to_script()
        logging.info("executing: %s", new_script)
        argv = ['sh', '-ec', new_script]
        xenv = ['%s=%s' % (k, v) for k, v in build.env.items()]
        (code, _, _) = testbed.execute(argv, xenv=xenv, kind='build')
        if code != 0:
>           testbed.bomb('"%s" failed with status %i' % (' '.join(argv), code), adtlog.AutopkgtestError)

reprotest/__init__.py:150: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

self = <reprotest.lib.adt_testbed.Testbed object at 0x7f5f9edbb0b8>
m = '"sh -ec if ( mv /tmp/autopkgtest.OqwEWK/build-control/ /tmp/autopkgtest.OqwEWK/const_build_path && umask 0022 && expo...exit $__x; else\n        echo >&2; "cleanup failed with exit code $?"; exit $__x;\n    fi;\nfi\n" failed with status 2'
_type = <class 'reprotest.lib.adtlog.AutopkgtestError'>

    def bomb(self, m, _type=adtlog.TestbedFailure):
        adtlog.debug('%s %s' % (_type.__name__, m))
        self.stop()
>       raise _type(m)
E       reprotest.lib.adtlog.AutopkgtestError: "sh -ec if ( mv /tmp/autopkgtest.OqwEWK/build-control/ /tmp/autopkgtest.OqwEWK/const_build_path && umask 0022 && export REPROTEST_BUILD_PATH=/tmp/autopkgtest.OqwEWK/const_build_path/ && linux64 --uname-2.6 sh -ec 'cd "$REPROTEST_BUILD_PATH"; unset REPROTEST_BUILD_PATH; python3 mock_failure.py' ); then
E           ( __c=0; mv /tmp/autopkgtest.OqwEWK/const_build_path /tmp/autopkgtest.OqwEWK/build-control/ || __c=$?; exit $__c; );
E       else
E           __x=$?;
E           if ( __c=0; mv /tmp/autopkgtest.OqwEWK/const_build_path /tmp/autopkgtest.OqwEWK/build-control/ || __c=$?; exit $__c; ); then exit $__x; else
E               echo >&2; "cleanup failed with exit code $?"; exit $__x;
E           fi;
E       fi
E       " failed with status 2

reprotest/lib/adt_testbed.py:370: AutopkgtestError

During handling of the above exception, another exception occurred:

virtual_server = ['null']

    def test_simple_builds(virtual_server):
        check_return_code('python3 mock_build.py', virtual_server, 0)
>       check_return_code('python3 mock_failure.py', virtual_server, 2)

tests/test_reprotest.py:62: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 

command = 'python3 mock_failure.py', virtual_server = ['null'], code = 2

    def check_return_code(command, virtual_server, code):
        try:
            build_variations = reprotest.build.Variations.of(
                reprotest.build.VariationSpec.default(TEST_VARIATIONS))
            retcode = reprotest.check(command, 'tests', 'artifact',
                virtual_server_args=virtual_server, build_variations=build_variations)
        except SystemExit as system_exit:
            retcode = system_exit.args[0]
        finally:
            if isinstance(code, int):
>               assert(retcode == code)
E               UnboundLocalError: local variable 'retcode' referenced before assignment

tests/test_reprotest.py:31: UnboundLocalError
===================== 1 failed, 17 passed in 98.50 seconds =====================
ERROR: InvocationError: '/tmp/testrun/.tox/py35/bin/python -m coverage run --omit .tox/* --parallel -m py.test -s tests/'
___________________________________ summary ____________________________________
ERROR:   py35: commands failed
debian/rules:26: recipe for target 'override_dh_auto_test' failed
make[1]: *** [override_dh_auto_test] Error 1
make[1]: Leaving directory '/tmp/testrun'
debian/rules:7: recipe for target 'build' failed
make: *** [build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2
debuild: fatal error at line 1124:
dpkg-buildpackage -rfakeroot -us -uc failed
Fri 22 Sep 14:39:18 UTC 2017 - /srv/jenkins/bin/chroot-run.sh stopped running as /tmp/jenkins-script-b9JxS9G2, which will now be removed.
Build step 'Execute shell' marked build as failure



More information about the Qa-jenkins-scm mailing list