Skip to content

Conversation

@icweaver
Copy link
Contributor

Hi all, thanks for this package!

After some prompting from Mosè, I added this brief usage example in case it might be useful for other folks. Happy to make any edits

Added instructions for interactive test execution using Pkg.
@maleadt
Copy link
Collaborator

maleadt commented Oct 22, 2025

May be worth documenting: I have a shell alias for that

function jltest {
    julia=(julia)

    # certain arguments (like those beginnning with a +) need to come first
    if [[ $# -gt 0 && "$1" = +* ]]; then
        julia+=("$1")
        shift
    fi

    "${julia[@]}" --startup-file=no --project -e "using Pkg; Pkg.API.test(; test_args=ARGS)" "$@"
}

... which allows me to do things like jltest +1.12 or jltest -- --verbose. Pretty convenient.

@icweaver
Copy link
Contributor Author

Oh, cool! Thanks for the tip, def adding this to my .bashrc

Would something like this make sense for the README? I wasn't sure if there was a way to pass julia_args too, so I just added it directly to the shell function

@maleadt
Copy link
Collaborator

maleadt commented Oct 22, 2025

I wasn't sure if there was a way to pass julia_args too, so I just added it directly to the shell function

Yes, if you do jltest --thread=auto -- --verbose the --threads=auto will be passed to the Julia executable invoking the Pkg.test expression. That's different from julia_args, but many args get forwarded to the inner process by virtue of Pkg using Base.julia_cmdline() or Base.JLOptions().. In some form or another, anyway; --threads=auto becomes --threads=32 on my system for the test process.

@icweaver
Copy link
Contributor Author

icweaver commented Oct 22, 2025

Oh whoops, the one combo I didn't try 🤦🏾‍♂️. Thanks, this is really cool! Just updated the example 7eea058

@giordano giordano added the documentation Improvements or additions to documentation label Oct 22, 2025
@maleadt maleadt merged commit ba1cd5e into JuliaTesting:main Oct 23, 2025
@icweaver icweaver deleted the icweaver-usage branch October 23, 2025 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants