The NetBSD Project

CVS log for src/usr.bin/make/unit-tests/varmod-order-numeric.mk

[BACK] Up to [cvs.NetBSD.org] / src / usr.bin / make / unit-tests

Request diff between arbitrary revisions


Keyword substitution: kv
Default branch: MAIN


Revision 1.8: download - view: text, markup, annotated - select for diffs
Tue Sep 27 19:18:45 2022 UTC (2 years, 6 months ago) by rillig
Branches: MAIN
CVS tags: perseant-exfatfs-base-20240630, perseant-exfatfs-base, perseant-exfatfs, netbsd-10-base, netbsd-10-1-RELEASE, netbsd-10-0-RELEASE, netbsd-10-0-RC6, netbsd-10-0-RC5, netbsd-10-0-RC4, netbsd-10-0-RC3, netbsd-10-0-RC2, netbsd-10-0-RC1, netbsd-10, HEAD
Diff to: previous 1.7: preferred, colored
Changes since revision 1.7: +7 -1 lines
tests/make: add tests for legacy local variables and sorting

Revision 1.7: download - view: text, markup, annotated - select for diffs
Wed Feb 9 21:09:24 2022 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.6: preferred, colored
Changes since revision 1.6: +3 -3 lines
make: fix mistakes, spelling and typos in comments and manual page

No binary change for -DNDEBUG.

Revision 1.6: download - view: text, markup, annotated - select for diffs
Fri Feb 4 23:43:10 2022 UTC (3 years, 2 months ago) by rillig
Branches: MAIN
Diff to: previous 1.5: preferred, colored
Changes since revision 1.5: +3 -4 lines
make: use fixed type for comparing numbers using the modifier ':On'

When the modifier ':On' was added on 2021-07-30, there were concerns
that pre-C99 environments would not have the type 'long long', therefore
the type was made configurable, but parsing such numbers was hard-coded
to using strtoll.

To improve compatibility with C90 environments, use 'long' and 'strtol'
in these environments.  In C99 environments, use 'long long' and
'strtoll', to account for larger file sizes.

If the flexibility of choosing yet another type for these numbers should
ever arise, it can still be implemented.  Until then, reduce the number
of possible build configurations.

Revision 1.5: download - view: text, markup, annotated - select for diffs
Tue Aug 3 04:46:49 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.4: preferred, colored
Changes since revision 1.4: +21 -7 lines
tests/make: fix test for the variable modifier ':On'

The variable modifier ':On' sorts words numerically.  If these words are
not numeric at all, they get assigned the numeric value 0.  Internally,
':On' uses qsort for sorting the words.  Since qsort is not specified to
use a stable sorting algorithm, the test data must only use words that
either are written in the same way or that are numerically different.

The test varmod-order failed this requirement by trying to numerically
sort a list of non-numeric words.  This led to different results on BSD
and Ubuntu, as could be expected.

To fix the tests, distinguish between words and numbers in the tests.
While here, clean up the tests for all variants of the variable modifier
':O'.

Found by sjg on Ubuntu.

Revision 1.4: download - view: text, markup, annotated - select for diffs
Sat Jul 31 20:55:46 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.3: preferred, colored
Changes since revision 1.3: +10 -70 lines
tests/make: split tests for the variable modifier ':O'

The tests for parse errors are now in varmod-order, which lets the other
tests focus on the desired behavior of the modifiers.

Revision 1.3: download - view: text, markup, annotated - select for diffs
Fri Jul 30 23:28:04 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.2: preferred, colored
Changes since revision 1.2: +11 -11 lines
make: handle parse errors in ':O' uniformly

Previously, the error handling for the variable modifier ':O' differed
depending on the exact variant and in some cases led to misleading
or missing diagnostics.

Revision 1.2: download - view: text, markup, annotated - select for diffs
Fri Jul 30 22:16:09 2021 UTC (3 years, 8 months ago) by rillig
Branches: MAIN
Diff to: previous 1.1: preferred, colored
Changes since revision 1.1: +87 -5 lines
make: fix typo in manual page, add more tests for the new ':On'

Revision 1.1: download - view: text, markup, annotated - select for diffs
Fri Jul 30 19:55:22 2021 UTC (3 years, 8 months ago) by sjg
Branches: MAIN
Add :On for numeric sort

Reviewed by: christos rillig

Diff request

This form allows you to request diffs between any two revisions of a file. You may select a symbolic revision name using the selection box or you may type in a numeric name using the type-in text box.

Log view options

CVSweb <webmaster@jp.NetBSD.org>