Stage-Package not able to pull latest source for checkbox-ng


#1

Hi @zyga,
I tried to create a snap using checkbox tool for some functional test of ubuntu core having arm64 arch.

File “/snap/itron-automated-test/x1/usr/bin/checkbox-cli”, line 3_
text = Welcome to System Testing!_
^_
SyntaxError: invalid syntax_
![image|624x67](upload://wLeGx2oHiI6GjjGkSlfz0DNbtwF.png)

After successfully creating and installing the snap getting the above error.
It seems checkbox-cli is outdated & having version -0.25
But it was working fine when i compiled the same snapcraft.yaml file for armhf arch, which is having checkbox-cli version - 1.2.0
here is my snapcraft.yaml file -

grade: devel
confinement: devmode

parts:
_ plainbox-provider-automation:_
_ plugin: plainbox-provider_
_ source: ./plainbox-provider-automation_
_ after: [plainbox]_
_ launchers:_
_ plugin: dump_
_ source: launchers/_
_ organize:_
_ ‘*’: bin/_
_ plainbox:_
_ plugin: nil_
_ stage-packages:_
_ - plainbox_
_ - checkbox-ng1.2.0_
_ config-variable:_
_ plugin: dump_
_ source: config_
_ my-service:_
_ plugin: dump_
_ source: daily_check_

apps:
_ test-runner:_
_ command: bin/test-runner_
_ itron-wan:_
_ command: bin/wan-mode_
_ itron-edge:_
_ command: bin/edge-mode_
_ itron-client:_
_ command: bin/client-mode_
_ daily-test-execution:_
_ command: daily_execution_test_
_ daemon: simple_
_ restart-condition: always_

![image|337x500](upload://94mPyJbSZZkDg6c2hSImER7ur7i.png)
I don’t no why there are two different behavior for different arch for same source code.
It seems both are fetching different checkbox-ng version for these two different arch.
I am new in this technology any help will help me in understanding the problem.
Appreciate your support here.

Thanks,
Shubham


#2

CC @kissiel since I don’t know much about checkbox today.


#3

It looks like your checkbox-cli binary is a checkbox launcher [0], which should call the real checkbox binary.

I think the problem lies in what your apps are doing, for instance this one:
bin/test-runner_itron-wan

I recommend following the structure of the generic checkbox-snappy [1].

[0] https://checkbox.readthedocs.io/en/latest/launcher-tutorial.html
[1] https://git.launchpad.net/checkbox-snappy/tree/?h=series16


#4

Thanks @zyga and @kissiel for your response and your guide.
Correct it will call the real checkbox binary which i pulled during stage-packages of snapcraft life cycle, will required to run the app.
But it was pulling two different source code of checkbox-ng and plainbox for two different architecture.
I am bit confuse with the working of stage-packages, will it pull the files/code from the host machine where i tried to create our snap as arm64 device having checkbox-cli version - 0.25 and armhf is having checkbox-cli version - 1.2.0.
https://git.launchpad.net/checkbox-snappy/tree/?h=series16
means adding parts : checkbox-ng-dev, source-tag: " " in my snapcraft.yaml file will resolve my problem correct ?