AgeCommit message (Collapse)AuthorLines
Find a capitalised extension's lexer againBryce Kwon-5/+12
Scintillua's detect() matches an extension by its case, and the fallback e1960f0 dropped had lowercased it, so MAIN.C and SETUP.PY lost their colour. The fake lexer now answers only for the suffixes it knows, as Scintillua does, which is what lets the check see it.
Test a lock won after its file became the slotBryce Kwon-1/+29
Spell side-by-side in the test commentsBryce Kwon-3/+3
Write the remaining config copies with cgitrc_copyBryce Kwon-12/+3
Move the feed link check in with the feed testsBryce Kwon-6/+6
It asks for a log page, and the index never carries a feed link.
Look for the old and new lines in one loopBryce Kwon-11/+4
Write the diff and patch checks as the suite doesBryce Kwon-29/+29
git -C, test_cmp with expect and actual, and rev-list --max-parents=0 for the root commit, the forms the other files use.
Drop the check for a language breakdown long goneBryce Kwon-4/+0
Ask for a url through cgit_url everywhereBryce Kwon-19/+19
Move the later tests to the config writersBryce Kwon-320/+182
The one-line request wrappers go with them. Configs with several repositories, a key out of place on purpose, the cache on or no repository of their own stay written out.
Add the shared config writers and cgit_rcBryce Kwon-275/+188
The helpers are named by kind. cgitrc_repo and cgitrc_copy write the config file named first, and cgit_url, cgit_query and cgit_rc run cgit, each named after what it is handed first. A repository copies its defaults from the globals read before its repo.url, so cgitrc_repo places every setting itself, and a global can no longer land where it silently stops applying. The t00xx and t01xx files move to them here.
Show the column fixture's commits like the othersBryce Kwon-1/+1
Drop test lines that repeat what came beforeBryce Kwon-6/+2
The download row was already matched on the same tag page, no fold can sit between the message and the signature the check requires, and the submodule row is the one the test before extracted.
Check the summary's branch, tags and clone url onceBryce Kwon-5/+0
bar's copies read the same page code as foo's, and the clone url row test that follows matches bar's url in full.
Leave the escape hook check to the tree testsBryce Kwon-11/+4
t0104 checks the same span, and what it holds, on the tree and blame pages, and t0502 checks it on a highlighted page.
Skip the shared fixtures where nothing reads themBryce Kwon-0/+2
t0004 reads only the documents, and t0005 builds its own repository and configs, so each run of either built five repositories for none.
Write the snapshot header and content checks onceBryce Kwon-21/+19
Leave the snapshot and feed tool checks to test-libBryce Kwon-22/+5
A lazy prerequisite is checked only when a test asks for it, and test-lib names the missing one on every skipped test, so the skip notes go too. test-lib already defines UNZIP and the unzip it checks. The test that unpacks a tag's tar.gz with gzip now asks for GZIP like every other one that does.
Cut test comments that restate the code beside themBryce Kwon-6/+1
Correct the test comments that went staleBryce Kwon-10/+10
Trim the tidy check down to what it doesBryce Kwon-17/+3
Nothing sets NO_TIDY_WARNINGS, and a warning never fails the check, so the knob only quieted the output of a verbose run.
Drop the exit lines that follow test_doneBryce Kwon-6/+0
test_done ends the script on every path, skip_all included.
Share one lock-file helper between the cachesBryce Kwon-0/+25
Ask for every path below the about page in one testBryce Kwon-22/+12
All of them stop at the same early return in about_fn, so each now gets the status, the html error page and a clean log.
Name the missing home without searching for oneBryce Kwon-10/+1
strace logs a call that names the path whether or not it succeeds, so a home that existed would still be caught, and cgit unsets HOME before git runs anyway.
Work out each gitlink's target onceBryce Kwon-11/+2
Test bodies run in the main shell, so the target named in the fixture reaches every check that greps for it.
Serve both readme escaping checks from one configBryce Kwon-16/+9
Ask each page that sorts odd branches in one loopBryce Kwon-23/+8
Write the test filter scripts with write_scriptBryce Kwon-9/+3
Derive the API test's config from the loud oneBryce Kwon-6/+1
Check the filter flush on the pages already fetchedBryce Kwon-16/+7
The about check already finds the div right before the filtered text, so its copy went, and the tree page is flattened where it was first read.
Cut test comments that repeat what is said nearbyBryce Kwon-13/+4
Correct two test comments that went staleBryce Kwon-3/+3
Drop test lines that add nothingBryce Kwon-4/+0
The trash directory starts empty and setup.sh already made the cache, the clamp check already fails on a short query, and the commit the setup named is still there to pin.
Leave two log checks to the log testsBryce Kwon-12/+0
t0103 already renders foo/log and finds commit 5, and its search for a bracket fails the same way this literal search did if --fixed-strings ever goes.
Leave the blob size refusals to the limits testsBryce Kwon-22/+5
t0204 asks the tree, plain, blob and blame pages for one oversized blob and checks the exact status and message, so the looser copy here went.
Look up a request's commit in one placeBryce Kwon-0/+10
The diff page now names a revision that is no commit the way the request wrote it, as the other pages already did, rather than as the full id it resolved to. The helpers sit beside the error page in ui-shared.c, since shared.c prints nothing.
Reuse the ids t0109 has already looked upBryce Kwon-2/+0
Drop the patch greps the comparisons already makeBryce Kwon-20/+0
The From, Date, Subject and signature lines are part of what the next test compares in full against git format-patch, for the single commit and for the range alike.
Put the valgrind comment above the loop it explainsBryce Kwon-3/+3
Drop two setup.sh lines that change nothingBryce Kwon-5/+3
The library has read TEST_RESULTS_SAN_DIR for the last time by the time it returns, and the trash directory it makes is empty, so there is no cache to remove.
Tighten the checks that match stray textBryce Kwon-8/+8
Every page holds foo in its footer element, the foo+bar row holds bar, the branch switcher holds master, and commit 1 and file-1 also match commits 10 to 19 and file-10 to file-19. A search page repeats its term in the search box. So these checks passed on pages that lacked what they look for, and each now matches the link itself.
Require a whole page when a filter exits earlyBryce Kwon-2/+3
When a filter cannot run, cgit dies mid-page with its Status line already out, so the check passed with no filter at all. That is the case wherever true lives only in /bin, as on busybox. true now comes from the PATH, and the page has to reach its end.
Make the main cgitrc filter check run the filterBryce Kwon-3/+6
The check asked for the summary page, which never runs an about filter, so it passed with exec:/bin/true on macOS, which has no such file, and with a filter that does not exist at all. Its first line read the stderr the previous test left behind. execvp searches the PATH, so a plain true runs the same on macOS, Debian and busybox.
Let go of a slot lock that cannot take its keyBryce Kwon-0/+15
A failed truncate or key write returned with the descriptor still open, so the lock was held while the page rendered uncached and the file was left behind. It is removed before its last close, as every holder does.
Keep lock contention out of the error logBryce Kwon-2/+20
process_slot logged every failure to lock, so each request that found its slot being filled left a line, while refresh_slot logged none, so an expired slot in a directory the server cannot write was served stale for good without a word. lock_slot now logs the step that failed, as the scan does, and leaves out only another request at work.
Lock the cached repolist with flockBryce Kwon-0/+38
The slot lock has to be an flock, since an exec filter drops a record lock when it closes the stdout a fill writes through. The scan only got by with fcntl because nothing reopens its file while it runs. One kind of lock lets the two share their code, and on Linux, where the kinds never see each other, an flock on the scan's file now holds a scan off like any other.
Open the lock files close-on-execBryce Kwon-0/+27
Each exec filter and snapshot compressor a fill runs inherited the slot's lock descriptor beside the stdout it writes into. An flock lasts until its last copy closes and nothing waits for a process a filter leaves behind, so a fill killed before its rename could leave the slot locked, and served stale or uncached, for as long as such a process lived. The scan holds its lock across no exec and opens the same way so that the two stay alike.
Tidy the cache test's helpers and outputsBryce Kwon-24/+18
The header's last sentence named two of the many later subjects, so it goes too. The second request's stderr is still kept, for the lock tests that come next.
Use test_dir_is_empty for the empty cache checksBryce Kwon-16/+8
The library's check also lists whatever was left behind when it fails.