Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Added the script to run integration tests in spi. #232
Conversation
elopio
added some commits
Dec 1, 2015
zyga
reviewed
Dec 8, 2015
| +set -x | ||
| + | ||
| +export GOPATH="$(mktemp -d)" | ||
| +trap "rm -rf $GOPATH"EXIT |
zyga
reviewed
Dec 8, 2015
| + | ||
| +export GOPATH="$(mktemp -d)" | ||
| +trap "rm -rf $GOPATH"EXIT | ||
| +export PATH="$PATH:$GOPATH/bin" |
zyga
Dec 8, 2015
Contributor
Do you need to build anything that might be on the system already (snappy/snapd)? Perhaps $GOPATH/bin:$PATH would be better so that you always get the locally built versions?
|
Apart from the two questions above, looks good to me |
|
Thanks for the review @zyga. I pushed both changes. |
chipaca
reviewed
Dec 13, 2015
| + | ||
| +# Script to run the integration tests in the Snappy Product Integration. | ||
| + | ||
| +set -x |
elopio
Dec 14, 2015
Member
Yes, if it exits before filling the result.json we get no information about what happened.
chipaca
reviewed
Dec 13, 2015
| +results_paste="$(pastebinit results/output/artifacts/results.pyunit 2>&1)" | ||
| +cat <<EOF > spi_test_result.json | ||
| +{ | ||
| + "output": "${output_paste}", |
chipaca
Dec 13, 2015
Member
One stray " in the tests output and the json asplodes. Maybe something like
python3 -c 'import os,json; for k, v in {"output": "output_print(json.dumps({"output": "{output_paste}".format(**os.environ)}))'
(etc.). You could also use jq's env function.
elopio
Dec 14, 2015
Member
with pastebinit we either get an error because the file doesn't exist, or a link. Both cases generate a correct json. So, wouldn't it be simpler and clearer to paste also the summary so the four fields are links?
niemeyer
Jan 5, 2016
Contributor
with pastebinit we either get an error because the file doesn't exist, or a link.
So the only possible outcome of that fiddly Python application that involves HTTP, XML configuration files, and HTML processing with regular expressions (!), is that it outputs a link or a single known error, and never any quotes? Doesn't seem very plausible.
Why not taking @chipaca's feedback and addressing the problem? Seems so easy..
elopio
Jan 6, 2016
Member
@niemeyer unless I misunderstood, @chipaca's proposal doesn't save us from using pastebinit.
I hate we have to use pastebinit. What I would like is for SPI to collect all the files we put in a well-known directory and upload them to a permanent storage that we can then consume from jenkins. But well, they told me to use pastebinit instead.
So, between using bash + pastebinit and using bash + pastebinit + python, I prefer the one with less things.
Now, you raise a good point. I didn't take into account that pastebinit can fail if the server is down or something. And that error could include quotes. So I'll get to implement @chipaca's wisdom.
|
Thanks! That's the only point I was raising.. or actually, @chipaca was raising.. I just emphasized it. Ensuring all these variables are properly format should be trivial enough. |
|
This is open for a month, and silent for a week. I'm closing it for the time being.. please feel free to reopen it when there is interest on the change again. |
elopio commentedDec 4, 2015
No description provided.