Skip to content

Conversation

@Penguinwizzard
Copy link
Contributor

This allows running jshost on the core unit tests easily from the python runner, as well as running core tests on arm and arm64.
Note: hold this change, and re-target to release/1.10 when ready.

Copy link
Contributor

@boingoing boingoing left a comment

Choose a reason for hiding this comment

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

LGTM

test/runtests.py Outdated

# arch: x86, x64
arch = 'x86' if args.x86 else ('x64' if args.x64 else None)
arch = 'x86' if args.x86 else ('x64' if args.x64 else ('arm' if args.arm else ('arm64' if args.arm64 else None)))
Copy link
Contributor

Choose a reason for hiding this comment

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

This... seems a bit ridiculous, especially with the two extra architectures. Could we make it into a dictionary lookup or a regular if tree?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I see your point, this is changed to a series of if statements in the next commit. I don't know of a good way to do this that's not significantly bigger or harder to read, though.

test/runtests.py Outdated
binary = os.path.join('Build', build, 'bin', '{}_{}'.format(arch, flavor), binary_name)
else:
binary = 'out/{0}/ch'.format(flavor)
binary = os.path.join('out', '{0}'.format(flavor), binary_name)
Copy link
Contributor

Choose a reason for hiding this comment

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

'{0}'.format(flavor) can just be flavor.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Addressed in new changeset.


# check ch failed
if exit_code != 0:
if exit_code != 0 and binary_name_noext == 'ch':
Copy link
Contributor

Choose a reason for hiding this comment

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

Why would this be specific to ch?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I believe that an uncaught exception in jshost causes us to exit with a non-zero error code, but in ch it causes us to exit with a 0 error code. We have some tests where the baseline includes the error message at the end. We may want to normalize this behavior in the future, but that's out-of-scope for this change.

@Penguinwizzard Penguinwizzard force-pushed the runtestspy_arm64_full branch from c4ef8a9 to 4849ccb Compare June 22, 2018 22:54
@Penguinwizzard Penguinwizzard changed the base branch from master to release/1.10 June 22, 2018 22:57
@chakrabot chakrabot merged commit 4849ccb into chakra-core:release/1.10 Jun 25, 2018
chakrabot pushed a commit that referenced this pull request Jun 25, 2018
… runtests.py

Merge pull request #5273 from Penguinwizzard:runtestspy_arm64_full

This allows running jshost on the core unit tests easily from the python runner, as well as running core tests on arm and arm64.
Note: hold this change, and re-target to release/1.10 when ready.
chakrabot pushed a commit that referenced this pull request Jun 25, 2018
…ull support to runtests.py

Merge pull request #5273 from Penguinwizzard:runtestspy_arm64_full

This allows running jshost on the core unit tests easily from the python runner, as well as running core tests on arm and arm64.
Note: hold this change, and re-target to release/1.10 when ready.
@Penguinwizzard Penguinwizzard deleted the runtestspy_arm64_full branch June 26, 2018 20:39
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.

4 participants