Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Slurm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tud-zih-energy
Slurm
Commits
efdb7cc9
Commit
efdb7cc9
authored
11 years ago
by
jette
Browse files
Options
Downloads
Patches
Plain Diff
Make rpmbuild test more general
Make it work for more system types Do not delete files if the build fails
parent
ad00cb13
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
testsuite/expect/test30.1
+29
-8
29 additions, 8 deletions
testsuite/expect/test30.1
with
29 additions
and
8 deletions
testsuite/expect/test30.1
+
29
−
8
View file @
efdb7cc9
...
@@ -41,14 +41,14 @@ set man_dir "_slurm_mandir /tmp/slurm_man/man"
...
@@ -41,14 +41,14 @@ set man_dir "_slurm_mandir /tmp/slurm_man/man"
set data_dir "_slurm_datadir /tmp/slurm_data/data"
set data_dir "_slurm_datadir /tmp/slurm_data/data"
set lib_dir "_libdir /opt/slurm/slurm_lib"
set lib_dir "_libdir /opt/slurm/slurm_lib"
set bin_dir "_bindir /etc/slurm"
set bin_dir "_bindir /etc/slurm"
set rpm_
path
"/tmp/built_rpms/RPMS
/x86_64/Slurm-0-0.x86_64.rpm
"
set rpm_
base
"/tmp/built_rpms/RPMS"
set file_name "slurm"
set file_name "slurm"
set exit_code 0
set exit_code 0
print_header $test_id
print_header $test_id
proc check_path {path file_name} {
proc check_path {path file_name} {
global bin_bash bin_grep rpm_path
global bin_bash bin_grep
exit_code
rpm_path
set loc_match 0
set loc_match 0
spawn $bin_bash -c "exec rpm -qpl $rpm_path | $bin_grep $file_name"
spawn $bin_bash -c "exec rpm -qpl $rpm_path | $bin_grep $file_name"
...
@@ -69,7 +69,6 @@ proc check_path {path file_name} {
...
@@ -69,7 +69,6 @@ proc check_path {path file_name} {
send_user "\nFAILURE: $file_name was put in the wrong place\n"
send_user "\nFAILURE: $file_name was put in the wrong place\n"
set exit_code 1
set exit_code 1
}
}
}
}
if {[test_cray] || [test_alps]} {
if {[test_cray] || [test_alps]} {
...
@@ -78,7 +77,7 @@ if {[test_cray] || [test_alps]} {
...
@@ -78,7 +77,7 @@ if {[test_cray] || [test_alps]} {
}
}
set timeout 1000
set timeout 1000
exec $bin_rm -fr /tmp/slurm
exec $bin_rm -fr /tmp/slurm
$tar_name /tmp/built_rpms
spawn $bin_cp -L -r -v $src_dir /tmp/slurm
spawn $bin_cp -L -r -v $src_dir /tmp/slurm
expect {
expect {
timeout {
timeout {
...
@@ -161,6 +160,22 @@ if {$build_match != 1} {
...
@@ -161,6 +160,22 @@ if {$build_match != 1} {
set exit_code 1
set exit_code 1
}
}
# Determine RPM build path. It could include "x86_64", "i386", etc.
set sub_dir ""
set timeout 10
spawn ls $rpm_base
expect {
-re "($alpha_numeric_under)" {
set sub_dir $expect_out(1,string)
exp_continue
}
eof {
wait
}
}
set rpm_path "${rpm_base}/${sub_dir}/Slurm-0-0.${sub_dir}.rpm"
set timeout 1000
# Check to see that srun man pages are in the correct directory.
# Check to see that srun man pages are in the correct directory.
check_path /opt/slurm srun.1
check_path /opt/slurm srun.1
...
@@ -170,7 +185,12 @@ check_path /opt/slurm srun
...
@@ -170,7 +185,12 @@ check_path /opt/slurm srun
# Check to see that slurmctld is in the correct directory.
# Check to see that slurmctld is in the correct directory.
check_path /opt/slurm/sbin slurmctld
check_path /opt/slurm/sbin slurmctld
exec $bin_rm -fr /tmp/built_rpm
if {$exit_code == 0} {
exec $bin_rm -fr /tmp/built_rpm
} else {
send_user "\nFAILURE: In phase one of the rpmbuild\n"
exit $exit_code
}
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 \
...
@@ -234,10 +254,11 @@ check_path /opt/slurm/slurm_lib lib
...
@@ -234,10 +254,11 @@ check_path /opt/slurm/slurm_lib lib
# Check that web pages are in the correct place
# Check that web pages are in the correct place
check_path /tmp/slurm_data/data accounting.html
check_path /tmp/slurm_data/data accounting.html
# Clean up vestigial files
exec $bin_rm -fr /tmp/slurm $tar_name /tmp/built_rpms
if {$exit_code == 0} {
if {$exit_code == 0} {
send_user "\nSUCCESS\n"
send_user "\nSUCCESS\n"
exec $bin_rm -fr /tmp/slurm $tar_name /tmp/built_rpms
} else {
send_user "\nFAILURE: In phase two of the rpmbuild\n"
}
}
exit $exit_code
exit $exit_code
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment