Commit 05c234e0 authored by Harald Sitter's avatar Harald Sitter

adjust tooling to behave differently with installation vs. !install tests

a bit cumbersome right now

- jenkinsfile sets us up
- contain passes known vars into container
- run patches them into the vars.json
- main.pm loads tests dependent on the vars (I think)
parent 11c1f94a
......@@ -8,12 +8,20 @@ cleanNode('master') {
stage('clone') {
git 'https://github.com/apachelogger/kde-os-autoinst'
}
stage('run') {
sh 'bin/contain.rb /workspace/bin/bootstrap.rb'
stage('installation') {
sh 'INSTALLATION=1 bin/contain.rb /workspace/bin/bootstrap.rb'
}
stage('plasma_folder') {
// hack: move raid into main dir form where our tooling will import it
// to run the tests
sh 'cp -rv wok/raid raid'
sh 'TESTS_TO_RUN=tests/plasma_folder.pm bin/contain.rb /workspace/bin/bootstrap.rb'
}
} finally {
archiveArtifacts 'wok/testresults/*.png, wok/testresults/*.json, wok/ulogs/*, wok/video.ogv'
junit 'junit/*'
// hack: undo hack from plasma_folder
sh 'rm -rv raid || true'
// sh 'rm -f wok.tar wok.tar.xz'
// sh 'tar cfJ wok.tar.xz wok'
// archiveArtifacts 'wok.tar.xz'
......
......@@ -60,6 +60,10 @@ c = CI::Containment.new(JOB_NAME,
image: CI::PangeaImage.new(:ubuntu, DIST),
binds: ["#{Dir.pwd}:#{PWD_BIND}"],
privileged: false)
env = []
env << 'INSTALLATION=1' if ENV.include?('INSTALLATION')
env << "TESTS_TO_RUN=#{ENV['TESTS_TO_RUN']}" if ENV['TESTS_TO_RUN']
status_code = c.run(Cmd: ARGV, WorkingDir: PWD_BIND,
Env: env,
HostConfig: { Devices: [dev_kvm] })
exit status_code
......@@ -53,6 +53,9 @@ config = {
QEMUCPUS: cpus
}
config[:TESTS_TO_RUN] = ENV['TESTS_TO_RUN'] if ENV['TESTS_TO_RUN']
config[:INSTALLATION] = ENV['INSTALLATION'] if ENV['INSTALLATION']
if Dir.exist?('../raid')
config[:BOOT_HDD_IMAGE] = true
config[:KEEPHDDS] = true
......
......@@ -33,7 +33,12 @@ my $dist = testapi::get_var("CASEDIR") . '/lib/distribution_neon.pm';
require $dist;
testapi::set_distribution(distribution_neon->new());
autotest::loadtest "tests/install_ubiquity.pm";
# autotest::loadtest "tests/plasma_folder.pm";
if testapi::check_var("INSTALLATION") {
autotest::loadtest "tests/install_ubiquity.pm";
} else {
for my $test (testapi::get_var("TESTS_TO_RUN")) {
autotest::loadtest $test;
}
}
1;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment