Skip to content
Snippets Groups Projects
Commit 0a4c5ff0 authored by Nathan Yee's avatar Nathan Yee Committed by Morris Jette
Browse files

Make rpmbuild test be more thorough

Check for build errors and warnings
parent 037d0d92
No related branches found
No related tags found
No related merge requests found
...@@ -121,6 +121,24 @@ expect { ...@@ -121,6 +121,24 @@ expect {
set build_match 1 set build_match 1
exp_continue exp_continue
} }
-re "\nerror: db5 error" {
send_user "\nWARNING: No installed RPM database on this system.\n"
exp_continue
}
-re "\nerror: cannot open Packages" {
send_user "\nWARNING: No installed RPM database on this system.\n"
exp_continue
}
-re "\nerror: " {
send_user "\nFAILURE: There was an error during the RPM build.\n"
set exit_code 1
exp_continue
}
-re "\nwarning: " {
send_user "\nFAILURE: There was a warning during the RPM build.\n"
set exit_code 1
exp_continue
}
timeout { timeout {
send_user "\nFAILURE: rpmbuild is not responding\n" send_user "\nFAILURE: rpmbuild is not responding\n"
set exit_code 1 set exit_code 1
...@@ -147,12 +165,30 @@ exec $bin_rm -fr /tmp/built_rpm ...@@ -147,12 +165,30 @@ exec $bin_rm -fr /tmp/built_rpm
set build_match 0 set build_match 0
spawn rpmbuild -ta -v $tar_name --define=$prefix_loc --define=$lib_dir \ spawn rpmbuild -ta -v $tar_name --define=$prefix_loc --define=$lib_dir \
--define=$topdir --define=$man_dir --define=$data_dir --define=$bin_dir --nodeps --define=$topdir --define=$man_dir --define=$data_dir --define=$bin_dir --nodeps
expect { expect {
-re "Wrote" { -re "Wrote" {
set build_match 1 set build_match 1
exp_continue exp_continue
} }
-re "\nerror: db5 error" {
send_user "\nWARNING: No installed RPM database on this system.\n"
exp_continue
}
-re "\nerror: cannot open Packages" {
send_user "\nWARNING: No installed RPM database on this system.\n"
exp_continue
}
-re "\nerror: " {
send_user "\nFAILURE: There was an error during the RPM build.\n"
set exit_code 1
exp_continue
}
-re "\nwarning: " {
send_user "\nFAILURE: There was a warning during the RPM build.\n"
set exit_code 1
exp_continue
}
timeout { timeout {
send_user "\nFAILURE: rpmbuild is not responding\n" send_user "\nFAILURE: rpmbuild is not responding\n"
set exit_code 1 set exit_code 1
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment