parent
7ae0dcddea
commit
94ca9c1879
@ -1,2 +1,3 @@
|
|||||||
/os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz
|
/os-autoinst-8b5f22e8a84cc12b3ab8b24992fbb601048adc1b.tar.gz
|
||||||
/os-autoinst-ff760a31dbdd8a96bd92683bd5ff45633ee149cd.tar.gz
|
/os-autoinst-ff760a31dbdd8a96bd92683bd5ff45633ee149cd.tar.gz
|
||||||
|
/os-autoinst-fe19b0042b53b88b5816511b50665c32459ae7d2.tar.gz
|
||||||
|
@ -1,61 +0,0 @@
|
|||||||
From cbe86deb74ba4ac216227d2e6f4e12d9d06f150a Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Williamson <awilliam@redhat.com>
|
|
||||||
Date: Fri, 29 Apr 2016 12:05:55 -0700
|
|
||||||
Subject: [PATCH] add an option to upload_logs to avoid dying on failure
|
|
||||||
|
|
||||||
in Fedora we use upload_logs a lot in post-fail hooks, and in
|
|
||||||
some cases the file may not exist. For instance, anaconda
|
|
||||||
creates lots of log files, some of which may not exist in some
|
|
||||||
circumstances. We would like to just be able to try and upload
|
|
||||||
them all but not have the post-fail hook die if any of them
|
|
||||||
does not exist, instead of having to test for each file's
|
|
||||||
existence before uploading it, or have a bunch of conditionals
|
|
||||||
that magically know which log files will exist in which state.
|
|
||||||
---
|
|
||||||
testapi.pm | 19 +++++++++++++++----
|
|
||||||
1 file changed, 15 insertions(+), 4 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/testapi.pm b/testapi.pm
|
|
||||||
index 78ef865..1c1bb21 100755
|
|
||||||
--- a/testapi.pm
|
|
||||||
+++ b/testapi.pm
|
|
||||||
@@ -1004,21 +1004,32 @@ sub data_url($) {
|
|
||||||
|
|
||||||
=head2 upload_logs
|
|
||||||
|
|
||||||
- upload_logs $file;
|
|
||||||
+ upload_logs($file [, failok => 0 ]);
|
|
||||||
|
|
||||||
Upload C<$file> to OpenQA WebUI as a log file and
|
|
||||||
-return the uploaded file name.
|
|
||||||
+return the uploaded file name. If failok is not set, a failed upload
|
|
||||||
+will cause the test to die. Failed uploads happen if the file does not
|
|
||||||
+exist or is over 20GiB in size, so failok is useful when you just want
|
|
||||||
+to upload the file if it exists but not mind if it doesn't.
|
|
||||||
|
|
||||||
=cut
|
|
||||||
sub upload_logs {
|
|
||||||
- my ($file) = @_;
|
|
||||||
+ my $file = shift;
|
|
||||||
+ my %args = @_;
|
|
||||||
+ my $failok = $args{failok} || 0;
|
|
||||||
|
|
||||||
bmwqemu::log_call('upload_logs', file => $file);
|
|
||||||
my $basename = basename($file);
|
|
||||||
my $upname = ref($autotest::current_test) . '-' . $basename;
|
|
||||||
my $cmd = "curl --form upload=\@$file --form upname=$upname ";
|
|
||||||
$cmd .= autoinst_url("/uploadlog/$basename");
|
|
||||||
- assert_script_run($cmd);
|
|
||||||
+ if ($failok) {
|
|
||||||
+ # just use script_run so we don't care if the upload fails
|
|
||||||
+ script_run($cmd);
|
|
||||||
+ }
|
|
||||||
+ else {
|
|
||||||
+ assert_script_run($cmd);
|
|
||||||
+ }
|
|
||||||
return $upname;
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.7.4
|
|
||||||
|
|
@ -1,108 +0,0 @@
|
|||||||
From 5f0ba3dafea7b6b15c080750b43f340490e2dbd1 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Adam Williamson <awilliam@redhat.com>
|
|
||||||
Date: Tue, 26 Apr 2016 11:49:26 -0700
|
|
||||||
Subject: [PATCH] don't hardcode libexecdir in openvswitch service file
|
|
||||||
|
|
||||||
once again, a hardcoding of libexecdir that breaks Fedora, so
|
|
||||||
we need to have the Makefile handle it.
|
|
||||||
---
|
|
||||||
Makefile.am | 10 ++++++++--
|
|
||||||
systemd/os-autoinst-openvswitch.service | 18 ------------------
|
|
||||||
systemd/os-autoinst-openvswitch.service.in | 18 ++++++++++++++++++
|
|
||||||
3 files changed, 26 insertions(+), 20 deletions(-)
|
|
||||||
delete mode 100644 systemd/os-autoinst-openvswitch.service
|
|
||||||
create mode 100644 systemd/os-autoinst-openvswitch.service.in
|
|
||||||
|
|
||||||
diff --git a/Makefile.am b/Makefile.am
|
|
||||||
index 006cbb9..e1d5669 100644
|
|
||||||
--- a/Makefile.am
|
|
||||||
+++ b/Makefile.am
|
|
||||||
@@ -94,6 +94,7 @@ CLEANFILES = \
|
|
||||||
doc/testapi.html
|
|
||||||
|
|
||||||
PERL_MODULE = ppmclibs/blib/arch/auto/tinycv/tinycv.so
|
|
||||||
+OPENVSWITCH_SERVICE = systemd/os-autoinst-openvswitch.service
|
|
||||||
|
|
||||||
ppmclibs/Makefile: ppmclibs/Makefile.PL
|
|
||||||
cd ppmclibs && \
|
|
||||||
@@ -102,6 +103,11 @@ ppmclibs/Makefile: ppmclibs/Makefile.PL
|
|
||||||
$(PERL_MODULE): ppmclibs/Makefile
|
|
||||||
$(MAKE) -C ppmclibs
|
|
||||||
|
|
||||||
+$(OPENVSWITCH_SERVICE):
|
|
||||||
+ rm -f $@ $@.tmp
|
|
||||||
+ sed -e 's,@pkglibexecdir[@],$(pkglibexecdir),g' '$(top_srcdir)/$@.in' > '$(top_srcdir)/$@.tmp'
|
|
||||||
+ mv '$(top_srcdir)/$@.tmp' '$(top_srcdir)/$@'
|
|
||||||
+
|
|
||||||
install-exec-local: $(PERL_MODULE)
|
|
||||||
$(MAKE) -C ppmclibs pure_install DESTDIR="$(DESTDIR)" INSTALLDIRS="$(INSTALLDIRS)"
|
|
||||||
|
|
||||||
@@ -110,7 +116,7 @@ all-local: $(PERL_MODULE)
|
|
||||||
doc/%.html: %.pm
|
|
||||||
pod2html $< > $@
|
|
||||||
|
|
||||||
-install-data-local:
|
|
||||||
+install-data-local: $(OPENVSWITCH_SERVICE)
|
|
||||||
$(MKDIR_P) $(DESTDIR)/$(packagestatedir) ; \
|
|
||||||
for i in $(packagestate_DATA_FOLDERS) ; do \
|
|
||||||
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(packagestatedir)" ; \
|
|
||||||
@@ -120,7 +126,7 @@ install-data-local:
|
|
||||||
cp -r $(top_srcdir)/$$i "$(DESTDIR)/$(pkglibexecdir)" ; \
|
|
||||||
done
|
|
||||||
install -D -m 644 $(top_srcdir)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf "$(DESTDIR)/etc/dbus-1/system.d/org.opensuse.os_autoinst.switch.conf"
|
|
||||||
- install -D -m 644 $(top_srcdir)/systemd/os-autoinst-openvswitch.service "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"
|
|
||||||
+ install -D -m 644 "$(top_srcdir)/$(OPENVSWITCH_SERVICE)" "$(DESTDIR)/usr/lib/systemd/system/os-autoinst-openvswitch.service"
|
|
||||||
|
|
||||||
uninstall-local:
|
|
||||||
for i in $(packagestate_DATA_FOLDERS) ; do \
|
|
||||||
diff --git a/systemd/os-autoinst-openvswitch.service b/systemd/os-autoinst-openvswitch.service
|
|
||||||
deleted file mode 100644
|
|
||||||
index af1b7fa..0000000
|
|
||||||
--- a/systemd/os-autoinst-openvswitch.service
|
|
||||||
+++ /dev/null
|
|
||||||
@@ -1,18 +0,0 @@
|
|
||||||
-# unit description file for os-autoinst openvswitch helper
|
|
||||||
-# start using e.g.
|
|
||||||
-# systemctl start os-autoinst-openvswitch.service
|
|
||||||
-[Unit]
|
|
||||||
-Description=os-autoinst openvswitch helper
|
|
||||||
-BindsTo=openvswitch.service
|
|
||||||
-After=openvswitch.service network.target
|
|
||||||
-Before=openqa-worker.target
|
|
||||||
-
|
|
||||||
-[Service]
|
|
||||||
-Type=dbus
|
|
||||||
-BusName=org.opensuse.os_autoinst.switch
|
|
||||||
-Environment=OS_AUTOINST_USE_BRIDGE=br0
|
|
||||||
-EnvironmentFile=-/etc/sysconfig/os-autoinst-openvswitch
|
|
||||||
-ExecStart=/usr/lib/os-autoinst/os-autoinst-openvswitch
|
|
||||||
-
|
|
||||||
-[Install]
|
|
||||||
-WantedBy=multi-user.target
|
|
||||||
diff --git a/systemd/os-autoinst-openvswitch.service.in b/systemd/os-autoinst-openvswitch.service.in
|
|
||||||
new file mode 100644
|
|
||||||
index 0000000..527ed28
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/systemd/os-autoinst-openvswitch.service.in
|
|
||||||
@@ -0,0 +1,18 @@
|
|
||||||
+# unit description file for os-autoinst openvswitch helper
|
|
||||||
+# start using e.g.
|
|
||||||
+# systemctl start os-autoinst-openvswitch.service
|
|
||||||
+[Unit]
|
|
||||||
+Description=os-autoinst openvswitch helper
|
|
||||||
+BindsTo=openvswitch.service
|
|
||||||
+After=openvswitch.service network.target
|
|
||||||
+Before=openqa-worker.target
|
|
||||||
+
|
|
||||||
+[Service]
|
|
||||||
+Type=dbus
|
|
||||||
+BusName=org.opensuse.os_autoinst.switch
|
|
||||||
+Environment=OS_AUTOINST_USE_BRIDGE=br0
|
|
||||||
+EnvironmentFile=-/etc/sysconfig/os-autoinst-openvswitch
|
|
||||||
+ExecStart=@pkglibexecdir@/os-autoinst-openvswitch
|
|
||||||
+
|
|
||||||
+[Install]
|
|
||||||
+WantedBy=multi-user.target
|
|
||||||
--
|
|
||||||
2.7.3
|
|
||||||
|
|
Loading…
Reference in new issue