diff mbox series

automation: save xen config before building

Message ID 20210505114516.456201-1-wl@xen.org (mailing list archive)
State New, archived
Headers show
Series automation: save xen config before building | expand

Commit Message

Wei Liu May 5, 2021, 11:45 a.m. UTC
It is reported that failed randconfig runs are missing the config file
which makes debugging impossible. Fix this by moving the line that
copies the config file before the build is executed.

Signed-off-by: Wei Liu <wl@xen.org>
---
 automation/scripts/build | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

Comments

Roger Pau Monné May 5, 2021, 12:23 p.m. UTC | #1
On Wed, May 05, 2021 at 11:45:16AM +0000, Wei Liu wrote:
> It is reported that failed randconfig runs are missing the config file
> which makes debugging impossible. Fix this by moving the line that
> copies the config file before the build is executed.
> 
> Signed-off-by: Wei Liu <wl@xen.org>

Acked-by: Roger Pau Monné <roger.pau@citrix.com>

Thanks!
Wei Liu May 5, 2021, 2:24 p.m. UTC | #2
On Wed, May 05, 2021 at 02:23:37PM +0200, Roger Pau Monné wrote:
> On Wed, May 05, 2021 at 11:45:16AM +0000, Wei Liu wrote:
> > It is reported that failed randconfig runs are missing the config file
> > which makes debugging impossible. Fix this by moving the line that
> > copies the config file before the build is executed.
> > 
> > Signed-off-by: Wei Liu <wl@xen.org>
> 
> Acked-by: Roger Pau Monné <roger.pau@citrix.com>

A patchew run shows this indeed fixes the issue. I've pushed this to
staging.

Wei.

> 
> Thanks!
diff mbox series

Patch

diff --git a/automation/scripts/build b/automation/scripts/build
index eaf70b11d1cb..46b6903d2922 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -16,6 +16,10 @@  else
     make -j$(nproc) -C xen defconfig
 fi
 
+# Save the config file before building because build failure causes the script
+# to exit early -- bash is invoked with -e.
+cp xen/.config xen-config
+
 # arm32 only cross-compiles the hypervisor
 if [[ "${XEN_TARGET_ARCH}" = "arm32" ]]; then
     hypervisor_only="y"
@@ -59,7 +63,6 @@  else
 fi
 
 # Extract artifacts to avoid getting rewritten by customised builds
-cp xen/.config xen-config
 mkdir binaries
 if [[ "${XEN_TARGET_ARCH}" != "x86_32" ]]; then
     cp xen/xen binaries/xen