[Chapel Merge] Run build commands in nightly after setting testdirs

Branch: refs/heads/main
Revision: fd62c185440a9fa59005a29bc0d008a6847744eb
Author: arifthpe
Link: Run build commands in nightly after setting testdirs by arifthpe · Pull Request #29341 · chapel-lang/chapel · GitHub
Log Message:
Run build commands in nightly after setting testdirs (#29341)

Move running the various building commands in util/cron/nightly to
occur after we're done setting up the $testdirs variable, so it can
determine what to build based on the contents of $testdirs.

A recent run of
test-c2chapel.bash

failed due to a timeout in cloning Mason dependencies, which is strange
as this config shouldn't need to build Mason. The logic added in
Make nightly smarter about cloning the mason deps by jabraham17 · Pull Request #29106 · chapel-lang/chapel · GitHub should have prevented
this, as test-c2chapel.bash tests only the c2chapel/
dir
.
However, reading in CHPL_NIGHTLY_TEST_DIRS (or indeed, setting
$testdirs at all) was only occurring after the Mason build decision
was made based on the unset $testdirs variable.

Note to reviewer: The deleted/added block of code was just cut and
pasted without any modifications and does not need review; only its
position relative to other code in nightly needs checking on.

[reviewed by @jabraham17 , thanks!]

Compare: Comparing 0386bfe90f4f5fcb45962deac75061e90416bd31...4f957f4bdae81e70451e99302b670f0c9fe164bd · chapel-lang/chapel · GitHub

Diff:
M util/cron/nightly
https://github.com/chapel-lang/chapel/pull/29341.diff