|
39 | 39 | echo "=== Skipping bcvk VM test (bcvk not available or /dev/kvm missing) ===" |
40 | 40 | fi |
41 | 41 |
|
| 42 | +# Test new tools added to devenv |
| 43 | +echo "" |
| 44 | +echo "=== Testing additional devenv tools ===" |
| 45 | + |
| 46 | +# Test nushell - should be available on all images |
| 47 | +echo "Testing nushell..." |
| 48 | +if ! command -v nu >/dev/null 2>&1; then |
| 49 | + echo "Error: nushell (nu) command not found" >&2 |
| 50 | + exit 1 |
| 51 | +fi |
| 52 | +echo "nushell version:" |
| 53 | +nu --version |
| 54 | +echo "nushell basic functionality test:" |
| 55 | +echo 'print "Hello from nushell!"' | nu |
| 56 | +echo "=== nushell test passed ===" |
| 57 | + |
| 58 | +# Test tmt - available on both systems but installed differently |
| 59 | +echo "Testing tmt..." |
| 60 | +if ! command -v tmt >/dev/null 2>&1; then |
| 61 | + echo "Error: tmt command not found" >&2 |
| 62 | + exit 1 |
| 63 | +fi |
| 64 | +echo "tmt version:" |
| 65 | +tmt --version |
| 66 | +echo "tmt basic functionality test:" |
| 67 | +# Create a minimal test directory with a working tmt setup |
| 68 | +tmpdir=$(mktemp -d) |
| 69 | +( |
| 70 | + cd "$tmpdir" |
| 71 | + # Create basic fmf metadata directory and file |
| 72 | + mkdir -p .fmf |
| 73 | + echo "1" > .fmf/version |
| 74 | + |
| 75 | + # Create a minimal test |
| 76 | + mkdir -p tests |
| 77 | + cat > tests/basic.fmf <<EOF |
| 78 | +summary: Basic validation test |
| 79 | +test: echo "tmt test validation passed" |
| 80 | +duration: 5s |
| 81 | +EOF |
| 82 | + |
| 83 | + # Create a minimal plan |
| 84 | + mkdir -p plans |
| 85 | + cat > plans/basic.fmf <<EOF |
| 86 | +summary: Basic validation plan |
| 87 | +discover: |
| 88 | + how: fmf |
| 89 | +execute: |
| 90 | + how: local |
| 91 | +EOF |
| 92 | + |
| 93 | + # Test tmt functionality |
| 94 | + echo "Testing tmt plan discovery..." |
| 95 | + tmt plan ls |
| 96 | + echo "Testing tmt test discovery..." |
| 97 | + tmt test ls |
| 98 | + echo "Basic tmt validation complete" |
| 99 | +) |
| 100 | +rm -rf "$tmpdir" |
| 101 | +echo "=== tmt test passed ===" |
| 102 | + |
| 103 | + |
| 104 | + |
42 | 105 | echo "" |
43 | 106 | echo "=== All tests passed ===" |
0 commit comments