From 38d71d71a4c633702fbb6ae7e7af13046430c413 Mon Sep 17 00:00:00 2001 From: Corey Hemminger Date: Thu, 4 Apr 2024 18:39:19 -0500 Subject: [PATCH] test28 Signed-off-by: Corey Hemminger --- .github/workflows/pkr-bld-qemu-x64.yml | 2 ++ .github/workflows/pkr-bld-virtualbox-x64.yml | 2 ++ lib/bento/test.rb | 6 +++--- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pkr-bld-qemu-x64.yml b/.github/workflows/pkr-bld-qemu-x64.yml index dbf64cda8..de3adf731 100644 --- a/.github/workflows/pkr-bld-qemu-x64.yml +++ b/.github/workflows/pkr-bld-qemu-x64.yml @@ -66,6 +66,7 @@ jobs: eval "$(chef shell-init bash)" gem build bento.gemspec gem install bento-*.gem + df -h - name: Bento build run: | eval "$(chef shell-init bash)" @@ -75,6 +76,7 @@ jobs: - name: Bento Test run: | eval "$(chef shell-init bash)" + df -h bento test libvirt - name: Upload build artifact uses: actions/upload-artifact@main diff --git a/.github/workflows/pkr-bld-virtualbox-x64.yml b/.github/workflows/pkr-bld-virtualbox-x64.yml index 17bdcd560..d6a773d7b 100644 --- a/.github/workflows/pkr-bld-virtualbox-x64.yml +++ b/.github/workflows/pkr-bld-virtualbox-x64.yml @@ -58,6 +58,7 @@ jobs: eval "$(chef shell-init bash)" gem build bento.gemspec gem install bento-*.gem + df -h - name: Bento build run: | eval "$(chef shell-init bash)" @@ -67,6 +68,7 @@ jobs: - name: Bento Test run: | eval "$(chef shell-init bash)" + df -h bento test ${{ matrix.os }} - name: Upload build artifact uses: actions/upload-artifact@main diff --git a/lib/bento/test.rb b/lib/bento/test.rb index 8338bde5f..1e6b27668 100644 --- a/lib/bento/test.rb +++ b/lib/bento/test.rb @@ -12,7 +12,7 @@ def initialize(opts) @no_shared = opts.no_shared @provisioner = opts.provisioner.nil? ? 'shell' : opts.provisioner @errors = [] - @regexp = opts.regexp + @regexp = opts.regexp || nil end def start @@ -72,8 +72,8 @@ def test_box(md_json) Dir.chdir(temp_dir) banner("Test kitchen file located in #{temp_dir}") - if @regexp - test = Mixlib::ShellOut.new("kitchen test #{@regexp}", timeout: 900, live_stream: STDOUT) + if regexp + test = Mixlib::ShellOut.new("kitchen test #{regexp}", timeout: 900, live_stream: STDOUT) test.run_command if test.error? test.stderr