- pytest seems to be for Python 2 in Ubuntu 18.04
If we use pytest instead of python3-test, it
won't find the falcon module provided by python3-falcon
- Please raise your hand if this breaks other distros
that wouldn't have the "pytest-3" executable.
- Updated documentation
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- For new statements like these (in "update.py"):
print(f"New blob #{idx} {hash}:{filename}")
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
If the first function in a file does not have a doc comment, do not
run off the beginning of the file. Fixes#102.
Also:
- Add t/tree/issue102.c that exhibits this bug.
- in find-file-doc-comments.pl and script.sh, exit with a nonzero code
if this should recur.
- find-file-doc-comments.pl: new file
- data.py: Add database to store doc-comment locations
- script.sh: Add parse-docs subcommand
- update.py:
- Add code to process doc comments
- Update some variable names in hopes of reducing confusion
- query.py:
- Add code to report doc comments
- Update some variable names in hopes of reducing confusion
Also:
- t/TestEnvironment.pm: Add find_doc attribute
- t/interact.pl: Don't die if update.py fails
- t/TestHelpers.pm: Permit checking specific sections of query.py output
- t/300: update regexes per the preceding
- gitignore tags (ctags output) and .cache (api_test.py output)
When a test fails, report the line number in the .t file that test
was invoked from, not the line number in TestHelpers.pm itself.
New function `line_mark_string()` adds the filename and line-number
information to strings of code, which are then run using `eval`.
Run `./t/interact.pl` and it will build a database from `t/tree` and
leave you in a shell so you can experiment. When you exit the shell,
the temporary repo and database will be cleaned up.
Also:
- TestEnvironment: add report() function to produce a human-readable
summary of the environment
- TestHelpers: turn on `strict` and `warnings` so the caller doesn't
have to manually `use strict` and `use warnings`.
- Change the few files that use leading tabs into leading spaces.
This way they match the other files in the repo.
- Add an EditorConfig file so that supported editors will automatically
use spaces instead of tabs.
- (Extra) Add some common editor backup-file extensions to .gitignore.
- Create new class t/TestEnvironment.pm. A TestEnvironment instance
owns a temporary Git repo and a temporary Elixir database directory.
- Update t/100-basic.t to use TestEnvironment.
- Add constant MUST_SUCCEED so `run_produces_ok()` calls are more
self-documenting
- Otherwise, we end up with a wrong path variable
that causes an internal server error
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
Display filenames and identifiers at the *beginning* of the <title>.
This way, they are better visible in modern browsers' tabs as they
usually cut off the title for space reasons.
This also fixes handling of the root path.
Examples of changed titles:
"Linux source code: (v5.5.6) - Bootlin" becomes "Linux source code (v5.5.6) - Bootlin"
"Linux source code: arch (v5.5.6) - Bootlin" becomes "arch - Linux source code (v5.5.6) - Bootlin"
"Linux source code: arch/um/Makefile (v5.5.6) - Bootlin" becomes "Makefile - arch/um/Makefile - Linux source code (v5.5.6) - Bootlin"
- Added test helpers in t/TestHelpers.pm
- Added basic test of update.py and query.py in t/100-basic.t
- Updated README:
- Added automated-testing section
- Formatted identifiers (i.e., added backticks)
These files all carry SPDX GPL2+ indicators. Based on the information
available to me, I have a good-faith belief that they can be combined
into this AGPLv3 project and licensed AGPLv3.
This commit only touches t/tree. Therefore, if the test suite later
needs to be changed, it will be sufficient to revert this commit.
The files used are those involved in the x64 compilation of
drivers/i2c/i2c-core-base.c, filtered to remove any that aren't
tagged GPL2+.
Note that t/tree itself is not a Git repo or submodule. It is a
collection of files that test scripts can use to populate a Git repo.
- Those were important structures in Linux
They deserve to be indexed.
- This will require re-indexing, so this will take a bit
of time to be fixed in the database
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
The GitHub repo doesn't have tags for sublevel (X.Y.Z) releases,
unlike the master Bootlin Elixir site. Add the master repo that does
have the sublevel tags to the README.