Skip to content

Commit d7fb931

Browse files
committed
script: use user-writable dir for install tests in mrel
Change Modules build tests to install in a user-writable directory (in /tmp). Sudo privileges are thus not needed anymore for this stage. Remove the build test from the local git repository. This installation style is covered by the installation test from the fetched repository. Signed-off-by: Xavier Delaruelle <[email protected]>
1 parent dc3f7b3 commit d7fb931

File tree

1 file changed

+19
-28
lines changed

1 file changed

+19
-28
lines changed

script/mrel

Lines changed: 19 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ if {$argc > 1} {
102102
if {[catch {
103103

104104
set exitcode 0
105+
set instdir /tmp/mods+test-install
105106
set rpmbuilddir $env(HOME)/rpmbuild
106107
set srpmdir $rpmbuilddir/SRPMS
107108
set rpmdir $rpmbuilddir/RPMS/$tcl_platform(machine)
@@ -176,7 +177,7 @@ set ghexporturl https://github.com/$ghremtgt/archive/$reltag.tar.gz
176177

177178
# clean previous release files
178179
file delete -force /tmp/mods+test-gz /tmp/mods+test-bz2 /tmp/mods+test-clone\
179-
/tmp/mods+test-export
180+
/tmp/mods+test-export $instdir
180181
file mkdir /tmp/mods+test-gz /tmp/mods+test-bz2 /tmp/mods+test-clone\
181182
/tmp/mods+test-export
182183
reportInfo {Recreate test directory /tmp/mods+test-gz and /tmp/mods+test-bz2\
@@ -287,77 +288,67 @@ quitorcont
287288
runcmd 2>@$logfid git push --force $gh_test_remote c-3.2
288289
runcmd 2>@$logfid git push --force $gh_test_remote $relbranch
289290
runcmd 2>@$logfid git push --force $gh_test_remote $reltag
290-
# see Phase 7 for CI result check
291-
292-
293-
# Phase 3: build, test, install from git repository
294-
# ---------------------------------------------------------
295-
296-
runcmd make
297-
runcmd script/mt
298-
runcmd 2>@$logfid sudo make install
299-
runcmd script/mt install
300-
runcmd 2>@$logfid sudo make uninstall
291+
# see Phase 6 for CI result check
301292

302293

303-
# Phase 4: build, test, install from generated dists
294+
# Phase 3: build, test, install from generated dists
304295
# ---------------------------------------------------------
305296

306297
cd /tmp/mods+test-gz
307298
runcmd tar xfz $cwd/$distgz
308299
cd modules-$relver
309300
reportInfo "Moved into '[pwd]' directory"
310-
runcmd ./configure
301+
runcmd ./configure --prefix=$instdir
311302
runcmd make
312303
runcmd 2>@$logfid script/mt
313-
runcmd 2>@$logfid sudo make install
304+
runcmd 2>@$logfid make install
314305
runcmd script/mt install
315-
runcmd 2>@$logfid sudo make uninstall
306+
runcmd 2>@$logfid make uninstall
316307
runcmd make clean
317308

318309
cd /tmp/mods+test-bz2
319310
runcmd tar xfj $cwd/$distbz
320311
cd modules-$relver
321312
reportInfo "Moved into '[pwd]' directory"
322-
runcmd ./configure
313+
runcmd ./configure --prefix=$instdir
323314
runcmd make
324315
runcmd 2>@$logfid script/mt
325-
runcmd 2>@$logfid sudo make install
316+
runcmd 2>@$logfid make install
326317
runcmd script/mt install
327-
runcmd 2>@$logfid sudo make uninstall
318+
runcmd 2>@$logfid make uninstall
328319
runcmd make clean
329320

330321
cd /tmp/mods+test-clone
331322
runcmd 2>@$logfid git clone $ghcloneurl
332323
cd modules
333324
reportInfo "Moved into '[pwd]' directory"
334325
runcmd 2>@$logfid git checkout $relbranch
335-
runcmd 2>@$logfid ./configure
326+
runcmd 2>@$logfid ./configure --prefix=$instdir
336327
runcmd make
337328
runcmd 2>@$logfid script/mt quick
338-
runcmd 2>@$logfid sudo make install
329+
runcmd 2>@$logfid make install
339330
runcmd script/mt install
340-
runcmd 2>@$logfid sudo make uninstall
331+
runcmd 2>@$logfid make uninstall
341332
runcmd make clean
342333

343334
cd /tmp/mods+test-export
344335
runcmd 2>@$logfid wget -O $reltag.tar.gz $ghexporturl
345336
runcmd tar xfz $reltag.tar.gz
346337
cd modules-$relver
347338
reportInfo "Moved into '[pwd]' directory"
348-
runcmd ./configure
339+
runcmd ./configure --prefix=$instdir
349340
runcmd make
350341
runcmd 2>@$logfid script/mt quick
351-
runcmd 2>@$logfid sudo make install
342+
runcmd 2>@$logfid make install
352343
runcmd script/mt install
353-
runcmd 2>@$logfid sudo make uninstall
344+
runcmd 2>@$logfid make uninstall
354345
runcmd make clean
355346

356347
cd $cwd
357348
reportInfo "Moved back into '[pwd]' directory"
358349

359350

360-
# Phase 5: build, test, install from RPM built locally
351+
# Phase 4: build, test, install from RPM built locally
361352
# ---------------------------------------------------------
362353

363354
runcmd 2>@$logfid rpmbuild --rebuild $srcrpm
@@ -369,7 +360,7 @@ foreach rpmpkg [glob $rpmdir/environment-modules-$rpmrelver.*.rpm] {
369360
}
370361

371362

372-
# Phase 6: build and test on Fedora platform
363+
# Phase 5: build and test on Fedora platform
373364
# ---------------------------------------------------------
374365

375366
# get list of targets
@@ -438,7 +429,7 @@ while {[array size koji_tasks]} {
438429
}
439430

440431

441-
# Phase 7: verify CI result
432+
# Phase 6: verify CI result
442433
# ---------------------------------------------------------
443434

444435
reportInfo "Checking CI tests status on $ghstatusurl"

0 commit comments

Comments
 (0)