Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tests/doc: some additions and reorganization of doc page #18190

Merged
merged 1 commit into from
Aug 4, 2022

Conversation

krzysztof-cabaj
Copy link
Contributor

Contribution description

During running all tests for few boards I noticed some lack of information in the tests doc page, for example, information how execute all automatic tests for particular board or about cleaning intermediate files. Moreover, current version of the documentation mixes information about running and implementation of tests.

My contribution:

  • add section concerning execution of all automate tests for particular boards,
  • add section concerning cleaning all intermediate files,
  • reorganization of documentation - move to the begin of page all information concerning test execution, later all information concerning implementation,
  • change section heading style, from dashed line (first time spotted in this file) to hashes (used in all other doc files).

Testing procedure

make doc
xdg-open doc/doxygen/html/running-and-creating-tests.html

Issues/PRs references

None

@github-actions github-actions bot added Area: doc Area: Documentation Area: tests Area: tests and testing framework labels Jun 10, 2022
@benpicco benpicco requested a review from kfessel June 10, 2022 11:43
@benpicco benpicco added the CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs label Jun 10, 2022
Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing the heading style seems ok for me (RiOT-doc just uses both in about equal amount)
reordering makes sense (more likely someone wants to exec (a) test(s))

I think the new cleanup paragraph need some extra words maybe also advertise a less aggressive cleanup strategy.


To delete all of this files go to main RIOT directory and execute command:

make distclean
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

distclean might remove a bunch of files that are not test specific.
(e.g. pkg sources, documentation if generated, other applications build)

I think this needs to be written down (warning) (distclean is just very not specific for test)

Copy link
Contributor Author

@krzysztof-cabaj krzysztof-cabaj Jun 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for review! Could you hint me other 'less aggressive cleanup' methods? distclean was the only one which I found when after running tests for three boards my file system was completely full.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

make clean "Cleaning all build products for the current board" If you know know which board you just tested.
This will spare you the pkg-download for the next board you test and the doc rebuild (if you like to have a local doc)

compile_and_test_for_board.py also has a --clean-after flag that might fit your need
or --compile-targets clean if you like to cleanup later

I put me this Makefile into tests/ and examples/ to do test-builds. (just building not testing) (the ignore list are for build chains that i do not have installed, the DONE files generated are for speed up repeated builds) not sure if this helps your Usecase.

DIRS := $(wildcard */)

IGNORE_EXAMPLES := mallinfo \
                  rust-gcoap \
                  rust-hello-world \
                  suit_update \
                  #

IGNORE_TESTS := cpu_avr8_xmega_drivers \
                cpu_efm32_features \
                cpu_efm32_drivers \
                driver_ws281x \
                driver_esp_eth \
                mcuboot \
                pkg_emlearn \
                pkg_nanopb \
                pkg_tensorflow-lite \
                rust_minimal \
                suit_manifest \
                sys_stdio_semihosting \
                ztimer_until \
                #

IGNORE := $(INGNORE) $(IGNORE_EXAMPLES) $(IGNORE_TESTS)

DIRS := $(filter-out $(addsuffix /,$(IGNORE)), $(DIRS))

CLEANLIST := $(addsuffix /bin,$(DIRS))
DIRSDONE := $(addsuffix /bin/DONE,$(DIRS))

all: $(DIRSDONE)
	@echo FINISHED ALL

$(DIRSDONE):
	$(MAKE) -C $(subst /bin/DONE,,$@)
	touch $@

$(DIRS): FORCE
	$(MAKE) -C $@

clean_all: undone
	rm -rf $(CLEANLIST)

undone:  FORCE
	rm $(DIRSDONE)

FORCE:

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for hints. I will test it and update this section accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I update section concerning various methods for cleaning intermediate files. @kfessel could you review my changes?

Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

reordering 👍
style 👍
reads well

@kfessel kfessel added CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable labels Aug 3, 2022
kfessel
kfessel previously requested changes Aug 3, 2022
Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please squash

@krzysztof-cabaj
Copy link
Contributor Author

Thanks for review.

All commits squashed.

@kfessel kfessel removed the CI: needs squashing Commits in this PR need to be squashed; If set, CI systems will mark this PR as unmergable label Aug 3, 2022
Copy link
Member

@maribu maribu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One nitpick inline. I am not insistent on the wording I suggest, feel free to rephrase/extend as you like. Please squash/amend directly.

tests/README.md Outdated Show resolved Hide resolved
Copy link
Contributor

@kfessel kfessel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This improves the current documentation

@kfessel kfessel enabled auto-merge August 4, 2022 10:24
@kfessel kfessel merged commit 29841ef into RIOT-OS:master Aug 4, 2022
@maribu maribu added this to the Release 2022.10 milestone Oct 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: doc Area: Documentation Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR CI: skip compile test If set, CI server will run only non-compile jobs, but no compile jobs or their dependent jobs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants