Skip to content

TEST: add atecc608a example to compilation test #11475

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

Merged
merged 3 commits into from
Nov 4, 2019

Conversation

jamesbeyond
Copy link
Contributor

Description

add atecc608a example to compilation test

Pull request type

[ ] Fix
[ ] Refactor
[ ] Target update
[ ] Functionality change
[ ] Docs update
[x] Test update
[ ] Breaking change

Reviewers

@adbridge

Release Notes

"mbed": [],
"test-repo-source": "github",
"features" : [],
"targets" : ["K64F"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Any target with I2C should work, although maybe this list is how you keep integration testing from growing too big.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is might depends on which target in the RaaS got the atecc608a shield. Also it is true we don't want to compile the exampled for too many target, it will not slow down the testing process

"test" : false,
"baud_rate": 9600,
"compare_log": ["mbed-os-example-atecc608a/tests/atecc608a.log"],
"auto-update" : true
Copy link
Contributor

Choose a reason for hiding this comment

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

Is examples.json the place to specify which RaaS tag is required to run the example (in this case, it'd be HAS_CRYPTOKIT)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This file has no control of which tatget in RaaS to use at moment. but no harm to put the info here, we'll need to sort that out in the test part

Copy link
Contributor

@adbridge adbridge left a comment

Choose a reason for hiding this comment

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

LGTM other than Jaeden's comments

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 13, 2019

CI started

@mbed-ci
Copy link

mbed-ci commented Sep 13, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 1
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-IAR
  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@Patater
Copy link
Contributor

Patater commented Sep 13, 2019

We may also need to restrict which compilers this example runs with, as Microchip's cryptoauthlib (which we depend on) doesn't build with ARMC or IAR.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

CI restarted, internal fault

@mbed-ci
Copy link

mbed-ci commented Sep 16, 2019

Test run: FAILED

Summary: 3 of 4 test jobs failed
Build number : 2
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-ARM
  • jenkins-ci/mbed-os-ci_build-GCC_ARM
  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

We may also need to restrict which compilers this example runs with, as Microchip's cryptoauthlib (which we depend on) doesn't build with ARMC or IAR.

@jamesbeyond Please review. The latest build failures are for all toolchains. There is a code 1 returned from the script and failing for this addition.

@@ -469,9 +469,9 @@
"github": "https://github.com/ARMmbed/mbed-os-example-atecc608a",
"mbed": [],
"test-repo-source": "github",
"features" : [],
"features" : ["HAS_CRYPTOKIT"],
Copy link
Contributor

Choose a reason for hiding this comment

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

Does this "features" setting correlate at all with the RaaS tag? There is no HAS_CRYPTOKIT Mbed OS feature.

@jamesbeyond
Copy link
Contributor Author

jamesbeyond commented Sep 16, 2019

HI @0xc0170 @Patater ,
I update the script to restrict only compile by GCC_ARM
But however, checking the log, seem GCC_ARM compile also failed.

[DEBUG] Errors: /builds/ws/mbed-os-ci_build-GCC_ARM@3/examples/mbed-os-example-atecc608a/./mbed-os/features/frameworks/unity/source/unity.c:192: multiple definition of `UnityDefaultTestRun'
[DEBUG] Errors: BUILD/K64F/GCC_ARM/atecc608a/mbed-os-atecc608a/mbed-cryptoauthlib/cryptoauthlib/test/unity.o:/usr/local/gcc-arm-none-eabi-6-2017-q1-update/arm-none-eabi/include/stdio.h:689: first defined here
[DEBUG] Errors: BUILD/K64F/GCC_ARM/mbed-os/features/frameworks/unity/source/unity.o: In function `UnityPrintNumberUnsigned':

I think this is because the example in the folder of mbed-os-example-atecc608a/atecc608a/ but our test infra will create a mbed-os folder in mbed-os-example-atecc608a/

Any explaination why the example have a extra atecc608a folder inside the example folder mbed-os-example-atecc608a/ ? @Patater

@Patater
Copy link
Contributor

Patater commented Sep 16, 2019

Any explaination why the example have a extra atecc608a folder inside the example folder mbed-os-example-atecc608a/ ?

The Mbed TLS example testing CI needs each example to be in its own folder so we can test it. For Mbed OS CI, I think some hg mirroring scripts need to be updated in order to support this. However, we are able to get away with the subfolder approach without hg script changes in https://github.com/ARMmbed/mbed-os-example-mbed-crypto/. I'm not sure why that example would work with this shape but not atecc, if the example shape is the problem.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Sep 16, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 3
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-IAR

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

CI restarted

@mbed-ci
Copy link

mbed-ci commented Sep 16, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 4
Build artifacts

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

Does this "features" setting correlate at all with the RaaS tag? There is no HAS_CRYPTOKIT Mbed OS feature.

The last question for this one to land, @jamesbeyond Please review . otherwise looks good to me

@jamesbeyond
Copy link
Contributor Author

@0xc0170, I believe I do need to revisit this PR, and changed the HAS_CRYPTOKIT feature, that Jaeden pointed out. I'll let you know as soon as this is ready

@jamesbeyond
Copy link
Contributor Author

I reverted the feature tag of HAS_CRYPTOKIT, becasue it block this example being build on K64F, I'll see how the CI build works. if the CI passed, I am happy about this change.

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 16, 2019

CI restarted

@jamesbeyond
Copy link
Contributor Author

@0xc0170 , Just talked with @Patater , he made a PR from the example side to fix the issue, I think we are good to restart CI, this can still going into 5.14 RC3

@mbed-ci
Copy link

mbed-ci commented Sep 17, 2019

Test run: FAILED

Summary: 1 of 4 test jobs failed
Build number : 9
Build artifacts

Failed test jobs:

  • jenkins-ci/mbed-os-ci_build-GCC_ARM

@0xc0170
Copy link
Contributor

0xc0170 commented Sep 17, 2019

@0xc0170 , Just talked with @Patater , he made a PR from the example side to fix the issue, I think we are good to restart CI, this can still going into 5.14 RC3

The failure are related. I think the same as previous ones, was it fixed?

@jamesbeyond
Copy link
Contributor Author

jamesbeyond commented Sep 18, 2019

The failure are related. I think the same as previous ones, was it fixed?

This failure is different from previous one, the reason for this is because our build testing configured to build from the root of the example folder, where the actual example is build from a sub folder inside root example folder. the solutions would be.

for temperate fixing:
Hi @Patater, seems only copy .mbedignore seems not enough, mbed_apps.json also need to be copied to the root.

Long term fixing:
we will fixing it from CI level, to enable the script handles examples with sub-folders correctly. but this will happen after 5.14 release.

@adbridge
Copy link
Contributor

@jamesbeyond what is the state of this ?

@jamesbeyond
Copy link
Contributor Author

as far as I can see, this won't make to 5.14.1, because the example changes is on going. this will to wait for another PR, which is not created yet. So let's postpone it to 5.14.2 @adbridge

@jamesbeyond
Copy link
Contributor Author

This PR will need to wait #11710 to be merged first

@mbed-ci
Copy link

mbed-ci commented Nov 1, 2019

Test run: SUCCESS

Summary: 11 of 11 test jobs passed
Build number : 10
Build artifacts

@jamesbeyond
Copy link
Contributor Author

The update of scripts is done. and In this PR the new example been added, also the temporarily turned off sub examples are turned back on for complication tests. Seems the CI passed as expected, I think this PR is good to go @ARMmbed/mbed-os-maintainers

@0xc0170 0xc0170 merged commit d3fb5fb into ARMmbed:master Nov 4, 2019
@jamesbeyond jamesbeyond deleted the exp_update branch November 6, 2019 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants