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

add end-to-end test for --minimal-toolchains #1619

Merged
merged 19 commits into from
Feb 19, 2016

Conversation

boegel
Copy link
Member

@boegel boegel commented Feb 17, 2016

This reproduces the issue in #1606.

Without #1614 included in develop, this test will fail.

cc @ocaisa, @damianam: please review?

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2711/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Feb 17, 2016

Test fails as it should:

ERROR [0.365s]: End-to-end test for --minimal-toolchains.
----------------------------------------------------------------------
Traceback (most recent call last):
  File "test/framework/options.py", line 2104, in test_minimal_toolchains
    self.eb_main(args, do_build=True, raise_error=True, testing=False)
  File "test/framework/utilities.py", line 242, in eb_main
    raise myerr
EasyBuildError: "Failed to process easyconfig /var/tmp/eb-_sxVRh/eb-JRorAV/eb-YKAHI_/eb-rmtr9f/eb-6H7qEN/eb-iSOisD/eb-8K9O5o/eb-T4sxWA/test_minimal_toolchains.eb: Failed to find easyconfig file 'hwloc-1.6.2-gompi-1.4.10.eb' when determining module name for: {'external_module_metadata': {}, 'full_mod_name': None, 'build_only': False, 'versionsuffix': '', 'external_module': False, 'dummy': False, 'toolchain': {'version': '1.4.10', 'name': 'gompi'}, 'name': 'hwloc', 'short_mod_name': None, 'version': '1.6.2', 'hidden': False}"

----------------------------------------------------------------------
Ran 387 tests in 366.827s

FAILED (errors=1)

@boegel
Copy link
Member Author

boegel commented Feb 17, 2016

let's retest now that #1614 is merged...

Jenkins: test this please

@@ -162,7 +162,7 @@ def get_toolchain_hierarchy(parent_toolchain):
for dep in parsed_ec['dependencies']:
ec = robot_find_easyconfig(dep['name'], det_full_ec_version(dep))
ec = process_easyconfig(ec, validate=False)[0]
alldeps = [ec['ec']['toolchain']] + ec['ec']['dependencies']
alldeps = [ec['ec']['toolchain']] + parsed_ec['dependencies']
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa: the fix in #1576 was not 100% correct, as I discovered when adding a test for it...

cc @damianam

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You sure this is correct? I think this was originally almost correct - what was the error? I think it should probably be

alldeps = [ec['ec']['toolchain']] + ec['ec']['dependencies'] + [dep['toolchain'] for dep in ec['ec']['dependencies']] 

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argh, I'm confused by this! But I think the line above will solve it. Your change is not focussed enough on toolchains. We only care about what toolchains are being used, the proposed line looks at the toolchains of deps, the deps of deps and the toolchains of the deps of deps. We will overpopulate the list but that's ok, because we do a set later.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa: the problem is that the previous line was taking the dependencies of the dependencies...

Say we're parsing GCC-4.9.3-2.25.eb; the dependencies are GCCcore and binutils, which are listed in parsed_ec['dependencies']

We also want to take into account the toolchain for each of these dependencies, so [ec['ec']['toolchain']]

We're adding the same list of deps over and over again now, so I need to change this to:

deps_tcs = [d['name'] for d in parsed_ec['dependencies']]
for dep in parsed_ec['dependencies']:
    # also add toolchains of each dep

or something like that (I'll look into it later)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but you're going backwards. The reason this was changed originally in #1576 was for iccifort built on GCCcore. iccifort depends on icc/ifort which then depend on GCCcore/binutils. Your proposal wouldn't cover this case. You need toolchains of deps and deps of deps and toolchains of deps of deps. Yes this is overkill but who cares, you've already parsed the deps anyway and we select only the toolchain we're interested in later and then make sure we have uniqueness.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, I'll add a testcase for iccifort and make sure that works too.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2714/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2715/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2716/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@@ -567,6 +567,14 @@ def test_get_toolchain_hierarchy(self):
{'name': 'gompi', 'version': '1.4.10'},
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

gompi is a bit of a broken choice when you try to add dummy, because the underlying GCC doesn't actually have any dependencies on anything built with dummy which is (currently) required. I guess we should hard-include dummy when the relevant option is there

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This would solve the first failing test

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wait, this problem is also the cause of the second test failure, it must be related to the change you made in the toolchain hierarchy generator

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's the caching for toolchain hierarchy screwing up the tests... We'll need to reset the cache.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think gompi is a broken choice, because we always include the toolchain too, not only the deps.

So, dummy is considered as a subtoolchain because GCC is built with dummy

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agreed, my mistake

On 18 Feb 2016 21:06, "Kenneth Hoste" <notifications@git.luolix.topmailto:notifications@github.com> wrote:

In test/framework/robot.pyhttps://github.com//pull/1619#discussion_r53374477:

@@ -567,6 +567,14 @@ def test_get_toolchain_hierarchy(self):
{'name': 'gompi', 'version': '1.4.10'},

I don't think gompi is a broken choice, because we always include the toolchain too, not only the deps.

So, dummy is considered as a subtoolchain because GCC is built with dummy


Reply to this email directly or view it on GitHubhttps://github.com//pull/1619/files#r53374477.



Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Dr. Karl Eugen Huthmacher
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Prof. Dr.-Ing. Harald Bolt,

Prof. Dr. Sebastian M. Schmidt


@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2722/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

ocaisa and others added 2 commits February 18, 2016 15:33
Add the cache clearing
@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2725/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel boegel mentioned this pull request Feb 18, 2016
@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2728/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2729/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2731/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2732/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Feb 19, 2016

@ocaisa: can you give this another look? Should be good to go.

current_tc_name, current_tc_version)

# parse the easyconfig
parsed_ec = process_easyconfig(path, validate=False)[0]

# search the toolchain+dependencies for the version of the subtoolchain
dep_tcs = []
dep_tcs = [d for d in parsed_ec['dependencies'] if d['name'] == subtoolchain_name]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I know this is a little pedantic since we have solved the particular problem with icc/ifort but...
Originally this function only dealt with toolchains from the depenencies, now it is dealing with dependencies and the toolchains of dependencies but these are not the same. Dependencies can have a versionsuffix which toolchains don't, so if we are adding dependencies we need to add them as

{'name': d['name'], 'version': '%s%s' % (d['version'], d['versionsuffix'])}

Same is true when adding dependencies below (basically need a repeat of this line). And I still think we should also be adding toolchains of deps of deps, since we've already parsed the deps it comes at zero cost (for example, if you had decided to comment out the GCCcore dependency rather than binutils in icc/ifort we wouldn't have picked up the GCCcore version even though it is available as the toolchain of binutils).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, makes sense to me, thanks for the feedback.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ocaisa: fixed now, please rererererererererereview?

@ocaisa
Copy link
Member

ocaisa commented Feb 19, 2016

lgtm
If it passes the tests, I'm happy

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2735/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link
Contributor

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2736/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member Author

boegel commented Feb 19, 2016

Going in, thanks for the excellent feedback @ocaisa!

boegel added a commit that referenced this pull request Feb 19, 2016
add end-to-end test for --minimal-toolchains
@boegel boegel merged commit 259a59f into easybuilders:develop Feb 19, 2016
@boegel boegel deleted the test_minimal_toolchains branch February 19, 2016 17:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants