- 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.
- Fix issue introduced by the previous commit
The 'project' variable could be tested even in the case
it wasn't defined (case of an invalid URL)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Return "400" status when the project doesn't have a database or repo
- In case the DB is not found, properly print the corresponding
file name in the logs
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Support "subdir-y" statements too
- Fix names in orginal directory includes
(can have '-' in directory names)
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Supporting hyperlinks for things like:
obj-$(VALUE) += file.o
obj-$(VALUE) += dir/
- For use in the Makefiles of Linux, Barebox and U-Boot
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Because there are usually multiple possibilities
- Linux kernel example, the kernel makefile seems to include (-I):
arch/<arch>/include/
in addition to
include/
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- In particular to support 'include <path>' statements
- Add some exceptions to the above filters, to exclude
includes that could go outside of the project
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- There was a +1 offset in shown file contents
- This was caused by a bad interpretation of the
code that was replaced by a previous commit
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- In an efficient way: each project defines the filters
it uses, instead of selecting filters from a long list
of filters that takes time to load.
- See filters/linux.py for example
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>
- Manage case that wasn't handled previously
- Return error 400 instead of 404
This fixes https://github.com/bootlin/elixir/issues/77
Signed-off-by: Michael Opdenacker <michael.opdenacker@bootlin.com>