Comments (3)
I meant something else here. Some function that we could use to run some important commands instead of running them and then checking the output. Such function could also log something useful. E.g. httpd-container uses:
function run() {
cmd="$1"
expected_res="${2:-0}"
msg="${3:-Running command '$cmd'}"
run_command "$cmd" "$expected_res" "$msg"
res=$?
test "$res" -eq "$expected_res" && res=0 || res=1
ct_check_testcase_result $res
return $res
}
Feel free to check also what rlRun
from beakerlib does (the implementation is pretty complex, attached to many internals, so nothing we could steal, but might be taken as an inspiration): https://github.com/beakerlib/beakerlib/blob/a5f5610ed254e07edbe60ec695a0203e64e4fb24/src/testing.sh#L664-L756
I can also imagine that the arguments of this function would be logged to a specific file/variable and when the test case fails, we could return what commands were run, so it could help figuring out a reproducer. IOW, we would not get all the preparation steps, only the important commands.
I'm not saying we cannot live with this new function (we're fine without it till today), it could just make the test scripts a bit more clear and output likely more readable.
from container-common-scripts.
I think that this is now covered by ct_run_tests_from_testset
.
Could we close this?
from container-common-scripts.
Thanks for explanation Honzo, now it makes sense to me and I agree. Let's leave this opened then.
from container-common-scripts.
Related Issues (20)
- Stop tests on SIGINT HOT 3
- Test log output improvements needed HOT 3
- Make sure that failed test in the end always fails the testsuite
- database library would be nice for mysql, mariadb and postgresql containers
- OCP tests: Make sure that failed test in the end always fails the testsuite HOT 2
- Do not try to get compressed image size when tests are interrupted HOT 4
- stop rebuild and testing of centos7 images HOT 1
- Migrate fedora images to f38 where possible HOT 5
- grep: warning: stray \ before - HOT 3
- Review hotfix for removing set -e from test-lib HOT 1
- Remove dead branches and set delete on merge as default HOT 1
- Fix check_latest_imagestreams.py HOT 1
- Adjust bot for common submodule updates.
- cancel running GitHub Action if a new one is created
- CentOS Stream 8 EOL on May 31th 2024 HOT 1
- Use imagestream generator for editing imagestream json files HOT 1
- Remove OpenShift 3 support from all https://github.com/sclorg repos HOT 1
- RHEL7 EOL on June 30th 2024 HOT 1
- Distribute show_all_imagestreams.py HOT 1
- RHEL7 EOL on June 30th 2024 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from container-common-scripts.