Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Mar 2024 07:06:06 -0700
From:      Alan Somers <asomers@freebsd.org>
To:        henrichhartzer@tuta.io
Cc:        Freebsd Stable <freebsd-stable@freebsd.org>
Subject:   Re: Running tests for a single program in src/bin, src/usr.bin, etc
Message-ID:  <CAOtMX2imfyXU5v7d7gscyPN7%2B%2B3vdm5kaP0Rv570hJdoCO6QBw@mail.gmail.com>
In-Reply-To: <NsB5umy--3-9@tuta.io>
References:  <NsB5umy--3-9@tuta.io>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Mar 4, 2024 at 5:55=E2=80=AFPM <henrichhartzer@tuta.io> wrote:
>
> Hi everyone,
>
> Not sure if this is the best list for this. Maybe hackers@ would be bette=
r?
>
> I wanted to tinker with utilities in /usr/src/bin and /usrsrc/usr.bin. I =
noticed that rmdir exits 1 for usage, which is a pet peeve of mine. I updat=
ed it to exit 2 and then wanted to alter the tests to ensure it's exiting 2=
.
>
> At this point, I'm unsure of how to run tests for this single component. =
Is there a way I can be in /usr/src/bin/rmdir and just run a succesful `mak=
e test` (or equivalent) without some combination of `make install` + kyua o=
ut of /usr/tests? Seems like for self-contained tests, simple testing shoul=
d be possible.
>
> I did find `make check`, but I'm having issues with checkdir sticking aro=
und.
>
> Thank you!
>
> -Henrich

If you don't like the fact that checkdir disappears, then you'll have
to do "make install".  But you don't need to run Kyua on the entire
test suite.  You can do it just on a subdir, like this:

sudo kyua test --kyuafile /usr/tests/bin/rmdir/Kyuafile



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOtMX2imfyXU5v7d7gscyPN7%2B%2B3vdm5kaP0Rv570hJdoCO6QBw>