Commit Graph

33 Commits

Author SHA1 Message Date
Matt Peters
b76ee66366 Add -buildmachine to LowLevelTests, so that DDC performance warnings can be downgraded to display.
#rnx
#rb Zousar.Shaker, Devin.Doucette
#preflight 63fd16fe437ce3e7f3449cce

[CL 24434214 by Matt Peters in ue5-main branch]
2023-02-27 17:44:59 -05:00
chris constantinescu
5a3a0cc990 Online LLT fix global setup
#rb stephen.ma
#preflight 63ee6fed4d2bd4346664ce25

[CL 24265150 by chris constantinescu in ue5-main branch]
2023-02-16 14:19:09 -05:00
chris constantinescu
4e7e7f9f3f LLT cleanup and improvements/updates:
- remove dependency on LaunchEngineLoop.cpp which also allows compilation against engine to succeed
- LowLevelTestsRunner no dependency on engine modules required: Launch, Core, Project
- EXPLICIT_TESTS_TARGET definition for self-contained tests: test modules and targets that derive from TestModuleRules/TestTargetRules respectively
- Cleanup Launch dependencies from existing explicit tests
- Cleanup redundant flags from existing explicit tests
- rename Self -> Foundation for in Horde
- additional platform fixes
Default #preflight 63e14d37244dc45a20e29337
All platform/tests LLTs #preflight 63e022f91b44ee7cb1c11d60
#rnx

[CL 24035900 by chris constantinescu in ue5-main branch]
2023-02-06 14:27:24 -05:00
chris constantinescu
d1ad7b190a Online/ OSS tests: Catch register tests using delegates, setup delegate is invoked during TestRunner::GlobalSetup and teardown during TestRunner::GlobalTeardown
#preflight 637501d9b663683828111981
#rb Michael.Kirzinger

[CL 23155638 by chris constantinescu in ue5-main branch]
2022-11-16 11:50:06 -05:00
chris constantinescu
7859a6cdb4 Catch2 feature introduced: test groups and group events at global, group and test group before/after levels
#preflight 636ab505450be1d9f83e90e4
#rb Jerome.Delattre

[CL 23039159 by chris constantinescu in ue5-main branch]
2022-11-08 16:02:46 -05:00
joe pribele
7938bdda07 [LowLevelTestRunner] added custom reporter to make parsing of xml easier for UnrealVS TestAdapter
#rb devin.doucette
#preflight 635312f3777a77c4407b2733

[CL 22702551 by joe pribele in ue5-main branch]
2022-10-21 18:00:09 -04:00
joe pribele
1366bc3f93 [Core] added support to lowlevel tests validating that ensure and check are executed
added  a tls for an ensure handler callback to let the reporting log of ensures to be overridden

the following macros are supported in lowlevel tests
REQUIRE_ENSURE
CHECK_ENSURE
REQUIRE_CHECK

#rb devin.doucette
#preflight 634827c457048bdb82b43ffe

[CL 22505260 by joe pribele in ue5-main branch]
2022-10-13 11:24:15 -04:00
jake niman
d8831901d1 Fix a crash on shutdown with LowLevelTests- some threads still may be accessing FCommandLine right as we're tearing down so make sure it is set properly.
#jira UE-163284
#review-22032414 @stephen.ma @chris.constantinescu
#preflight 63236351c225e8be380d130d

[CL 22033267 by jake niman in ue5-main branch]
2022-09-15 14:01:41 -04:00
chris constantinescu
08fee9ccbf Low level tests quality of life changes:
- bump "Started test case" log messages to Display when --debug is used
- additional duration log messages. Catch2 durations were never printed in sync with --debug log messages
- ability to specify a device and attach to a debugger when running the LowLevelTests script; ability to specify configuration type
#rb Devin.Doucette, Jerome.Dellatre
#preflight 631f554d705bdbceb5b91b82

[CL 21989658 by chris constantinescu in ue5-main branch]
2022-09-13 15:06:34 -04:00
devin doucette
6a0aa068b2 LowLevelTests: Restored previous indentation in TestRunner.cpp
#jira none
#preflight skip
#rb none
#rnx

[CL 21975739 by devin doucette in ue5-main branch]
2022-09-12 19:26:01 -04:00
Devin Doucette
8d4b17d3d2 LowLevelTests: Always shut down modules on exit
It is unsafe to skip module shutdown because many modules need to destroy things that were lazily initialized, and may crash later during shutdown if the expected shutdown flow was skipped.

#jira UE-163043
#preflight 631a272a980179553ed8097d
#preflight 631a27eea60c539c989bc821
#rb Brandon.Schaefer
#rnx
#fyi Chris.Constantinescu

[CL 21902718 by Devin Doucette in ue5-main branch]
2022-09-08 16:35:00 -04:00
chris constantinescu
714b6470c8 LLT TestRunner non-STL argument value parsing
#rb Devin.Doucette
#preflight 630fb502556fc14dce9df430

[CL 21739890 by chris constantinescu in ue5-main branch]
2022-09-01 10:12:37 -04:00
chris constantinescu
b192ea74b9 Sleep uses seconds, not milliseconds
#rnx
#preflight skip

[CL 21562824 by chris constantinescu in ue5-main branch]
2022-08-25 09:30:44 -04:00
chris constantinescu
f11a47ac10 RightChop instead of LeftChop
#rnx
#preflight skip

[CL 21554622 by chris constantinescu in ue5-main branch]
2022-08-24 18:35:23 -04:00
chris constantinescu
b604e668e2 Test runner:
- sleep on init to allow for sync w/ Gauntlet for Xbox platforms
- remove unused --base-global-module #fyi Stephen.Ma
Gauntlet:
- support low level tests build for different configurations (debug etc)
- readable command line arguments (-r to --reporter)
- allow argument names containing "-" e.g. --filenames-as-tags
#preflight 630536b1c00af5e2943540a1
#rb Jerome.Delattre

[CL 21550045 by chris constantinescu in ue5-main branch]
2022-08-24 15:53:16 -04:00
Devin Doucette
aea7f2af32 LowLevelTests: Allow command line arguments to the engine following "--"
The --base-global-module argument is now expected to be in the format --base-global-module=ModuleName.

RunTests has been refactored into the new private FTestRunner type.

#preflight 6303991333729407e88f8069
#preflight 6303a65a516bef57ff7420b4
#rb Chris.Constantinescu

[CL 21485276 by Devin Doucette in ue5-main branch]
2022-08-22 12:16:02 -04:00
Devin Doucette
bd378f5441 LowLevelTests: Use Unreal logging functionality instead of LocalPrint
#preflight 62ffef1cd642db47d8d52c90
#preflight 62feb1fb3c4417dcec1aaabb
#rb Chris.Constantinescu

[CL 21464557 by Devin Doucette in ue5-main branch]
2022-08-19 16:28:57 -04:00
joe pribele
fc71c8cb35 [LowLevelTestsRunner] added --break to Catch command line args to break into debugger when attached by default.
#rb devin.doucette
#preflight 62f3fd00e60c9215b991bd07

[CL 21323419 by joe pribele in ue5-main branch]
2022-08-10 14:53:21 -04:00
chris constantinescu
e90997b34e Catch2 - mini module cleanup
#preflight 62c793827e606620fd304713
#rb Jerome.Delattre

[CL 21004901 by chris constantinescu in ue5-main branch]
2022-07-08 06:55:54 -04:00
chris constantinescu
2300a4ad0f LLTs: Maximum log verbosity with --debug, allow logging from fault context
#rb Devin.Doucette
#preflight skip

[CL 20464451 by chris constantinescu in ue5-main branch]
2022-06-01 22:45:35 -04:00
chris constantinescu
b258362e47 Catch2 3.0 preview source code integration with on-demand static library build for all platforms.
Other preflights: Catch2 Build Library 6283d1c14316db80d194f6c8, Nightly Low Level Tests 6283d1c9114e08fa2f237e6b
#preflight 6283d1b5114e08fa2f237db3

[CL 20248814 by chris constantinescu in ue5-main branch]
2022-05-17 15:06:28 -04:00
chris constantinescu
054a91e666 Introduce global setup for the LowLevelTests project.
Motivation: CoreUObject, taskgraph and threads are global constructs and need to be initialized as such and are expensive to setup/teardown before/after multiple single tests.

Introduced --global-setup and --no-global-setup to control execution of global test setup.
Unit tests that rely heavily on mocking and are designed to run without any global context should use --no-global-setup

Other: Removed CoreTestFixture and applied minor fixes wherever things didn't make sense.
One particular CoreUObject test was converted but had always failed to run on non-desktop platforms. It needs to be addressed ASAP.

#preflight 625873c7e304a95465fc148e
#rb Devin.Doucette, Zousar.Shaker

[CL 19769262 by chris constantinescu in ue5-main branch]
2022-04-15 07:21:27 -04:00
matija kecman
e417ffe69a Catch unit tests: Redirect UE_LOG and ensure output to the global log singleton when running unit tests with Catch
Prior to this change running a catch executable (e.g., I tested with GeometryProcessingUnitTests.exe) there was no way to see any UE_LOGs or ensure output. Following this change ensure output is always shown, UE_LOG output with verbosity level <= Warning is shown if the command line argument "--log" is passed, and  UE_LOG output with verbosity level <= Log is shown if the command line arguement "--debug" is also passed. For even more verbose output the `DesiredLogVerbosity` variable in TestRunner.cpp can be edited.

#rb jimmy.andrews
#rnx
#jira none
#preflight 6255dc50153828d2734dbe7c

[CL 19728147 by matija kecman in ue5-main branch]
2022-04-12 16:27:07 -04:00
mark lintott
bc9b168688 Add new Unit Tests
#rb Chris.Constantinescu
#preflight 62458f77292f228e09013681

[CL 19571202 by mark lintott in ue5-main branch]
2022-03-31 07:45:37 -04:00
chris constantinescu
ae281656f2 Tests converted from 18848115 made to work multi-platform.
Not all were converted because they were designed for packaged applications whereas low level tests are designed to run as "native" non-packaged applications.
- reporting support for non-desktop platforms, for the moment Catch2 report type "console" is used that is sent to a .out file
- most number of tests possible running multi platform, slower tests excluded on incremental builds
- slow tests are moved to run on the monolithic build
- Catch2 report failure event listener such that Horde detects them as build errors. Must add new Horde matcher for Catch2 failures

#rb Mark.Lintott
#preflight 623c8de389625f0612dabd64

[CL 19498448 by chris constantinescu in ue5-main branch]
2022-03-24 13:28:25 -04:00