Closed Bug 165756 Opened 22 years ago Closed 22 years ago

Running tests without checksetup causes failure


(Bugzilla :: Testing Suite, defect, P1)




Bugzilla 2.18


(Reporter: jacob, Assigned: bbaetz)




(1 file)

If one (such as myself :) were to checkout Bugzilla and then immediately run the
tests, 001compile.t will fail 3 times because is looking for the
shutdownhtml param which won't exist in a non-installed directory.

Whats happening is that the 'require' of is checking the shutdownhtml
param, but this happens before the Bugzilla::Config init code runs.

I need to swap orderings arround a bit; this is only temporary until
Bugzilla::CGI  happens, anbd the check moves there.
Actually, no - I was wrong.

This is, in fact, WONTFIX needs to do updaing of old params, which means that we can't load
new ones first. If we can't load new ones, then we can't cope with the file not

Lets just fix checksetuptorun w/o problems, and then update tbox.

(Bugzilla::CGI will move the shutdownhtml check to creating a new CGI object,
but it will still need to acess the Maintainer for Bugzilla::CGI errormessages
which must happen at BEGIN time)
Depends on: 123957
Now that bug 123957 is fixed, tinderboxes should run checksetup before running
Summary: Running tests w/out causes to fail → tinderboxes need to run checksetup before tests
To me, this is backwards... even when installing.  I'm gonna wanna run the tests
to make sure everything is working before I install it (ie, run
 For this purpose, we should probably have a .t file that checks for the
existence of the required modules (but that's another bug :)
Our tests aren't functional tests - the presense of lack of a spelling mistake
will not affect the results.

Once we have functional tests, then a database will be required to run them...
It is, of course, possiblew that we could have checksetup create/run on a test
db (and we probably will) but for teh moment....
Can't we configure it to only fail on a GetParam?  Why is -c running code anyway?
Priority: -- → P1
Target Milestone: --- → Bugzilla 2.18
-c runs code because -c runs BEGIN blocks, and |use| are effectivly BEGIN blocks.

ACtually, I just looked at this again, and I have a fix.

The problem is that packages should not be requiring themselves.

This is really bad if they do so after the package line (because stuff is then
in the wrong namespace), but its not a good idea anyway.

Fix coming.
Assignee: zach → bbaetz
Summary: tinderboxes need to run checksetup before tests → Running tests without checksetup causes failure
Attached patch patchSplinter Review
Comment on attachment 97728 [details] [diff] [review]

Would like a 2xr from someone more expert on the implications of style
Attachment #97728 - Flags: review+
Comment on attachment 97728 [details] [diff] [review]

I'm not an expert, but I can't see any problems with this (as long as each
caller requires before the .pm's...

Attachment #97728 - Flags: review+
Checked in.
Closed: 22 years ago
Resolution: --- → FIXED
QA Contact: matty_is_a_geek → default-qa
You need to log in before you can comment on or make changes to this bug.