Selaa lähdekoodia

Migrate preupg/in-pipe from downstream

Alois Mahdal 6 vuotta sitten
vanhempi
commit
cdb5b36e02
2 muutettua tiedostoa jossa 30 lisäystä ja 0 poistoa
  1. 2
    0
      src/preupg/in-pipe/main.fmf
  2. 28
    0
      src/preupg/in-pipe/test

+ 2
- 0
src/preupg/in-pipe/main.fmf Näytä tiedosto

@@ -0,0 +1,2 @@
1
+description: running in UNIX pipe
2
+timeout: 15m

+ 28
- 0
src/preupg/in-pipe/test Näytä tiedosto

@@ -0,0 +1,28 @@
1
+#!/bin/bash
2
+
3
+shellfu import jat_dump
4
+shellfu import preupg_fupath
5
+
6
+jat__pstarts "collect outputs"
7
+    preupg_fupath RHEL6_7 @pass @failed @informational @not_applicable
8
+    jat__eval -S 2 -h "run preupg and confirm via non-tty stdin" \
9
+        "preupg -c RHEL6_7/all-xccdf.xml <<<y >preupg.out 2>preupg.err"
10
+jat__pend
11
+
12
+jat__pstartt "BZ#1231410"       # preupgrade fails if stdin fed from pipe (list index out of range)
13
+    ERR="preupg: error: list index out of range"
14
+    jat__cmd -S 1 -h "the known error is not seen: $ERR" \
15
+        grep "$ERR" preupg.err
16
+jat__pend
17
+
18
+#FIXME: enable after PR#343
19
+#       https://github.com/upgrades-migrations/preupgrade-assistant/issues/343
20
+jat__pstartt "BZ#1331416"       # preupg prints error messages when stdin is redirected from pipe
21
+    ERR="Inappropriate ioctl for device"
22
+    jat__cmd -S 1 -h "the known error is not seen: $ERR" \
23
+        grep "$ERR" preupg.err
24
+jat__pend
25
+
26
+jat__pstartd
27
+    jat_dump__file preupg.out preupg.err
28
+jat__pend