Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add switch -s|--stdengine #346

Merged
merged 4 commits into from
Jan 18, 2024
Merged

Add switch -s|--stdengine #346

merged 4 commits into from
Jan 18, 2024

Conversation

josephwright
Copy link
Member

No description provided.

@josephwright josephwright linked an issue Jan 17, 2024 that may be closed by this pull request
@muzimuzhi
Copy link
Contributor

muzimuzhi commented Jan 17, 2024

Need to be added to the big list of options

l3build/l3build.dtx

Lines 369 to 372 in 3d51aae

% As well as these targets, the system recognises the options
% \begin{itemize}
% \item |--config| (|-c|) Configuration(s) to use for testing
% \item |--date| Date to use when tagging data

Also searching for -s in l3build.pdf I spot an existing typo mentioning -s (lowercase s) (on line 460, see below), which was introduced in c4471ca (Add new --rerun|-r option (#17), 2017-07-01) hence looks like it should be -r (short for --rerun).

l3build/l3build.dtx

Lines 454 to 461 in 3d51aae

% \begin{buildcmd}{check \meta{name(s)}}
% Checks only the test \texttt{\meta{name(s)}.lvt}.
% All engines specified by \var{checkengines} are tested unless the command
% line option |--engine| (or |-e|) has been given to limit
% testing to a single engine. Normally testing is preceded by unpacking
% source files and copying the result plus any additional support to the
% test directory: this may be skipped using the |-s| option.
% \end{buildcmd}

Update: Addressed in f0d095b (Correct rerun docs, 2024-01-17).

Copy link
Member

@FrankMittelbach FrankMittelbach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

somebody remarked that this should be also in the main (pdf) documentation. Otherwise, looks fine. (somebody was Yukai, as I now see :-))

Comment on lines +600 to 601
elseif options["engine"] then
checkengines = options["engine"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not really for this pr but seeing this line: shouldn't in case of -e the checkengines variable set to the \cap of "engine" and the existing "checkengines" of a config file?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not necessarily - you can add -f for force running with an 'unsuitable' engine

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

-- Sanity check
function check_engines(config)
  if options["engine"] and not options["force"] then
    -- Make a lookup table
    local t = { }
    for _, engine in pairs(checkengines) do
      t[engine] = true
    end
    for _, engine in pairs(options["engine"]) do
      if not t[engine] then
        print("\n! Error: Engine \"" .. engine .. "\" not set up for testing with configuration \"" .. config .. "\"!")
        print("\n  Valid values are:")
        for _, engine in ipairs(checkengines) do
          print("  - " .. engine)
        end
        print("")
        exit(1)
      end
    end
  end
end

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I nevery really understood the use case for force :-) but yes, that makes it a little more complicated. But in case of asking for -ewithout -f: wouldn't it be more oportune to simply not do any tests for any of the "e" engines that are not in "checkengines" of a particular config rather calling it an error? Well maybe not, dunno

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well we could drop --force: it was there for some setup stuff which likely we no longer need (and I think -s makes redundant).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That could be done separate from the PR of course

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we could I guess, and yes it should be done in a separate pr.

l3build.1 Outdated Show resolved Hide resolved
l3build.dtx Outdated Show resolved Hide resolved
Co-authored-by: Yukai Chou <[email protected]>
@josephwright josephwright merged commit 760e2e3 into main Jan 18, 2024
2 checks passed
@josephwright josephwright deleted the stdengine branch January 18, 2024 07:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check with stdengine only
3 participants