-
Notifications
You must be signed in to change notification settings - Fork 282
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17985 from Martchus/cycle
Remove cyclic dependency between `main_common.pm` and `main_ltp.pm`
- Loading branch information
Showing
5 changed files
with
31 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
# Copyright SUSE LLC | ||
# SPDX-License-Identifier: GPL-2.0-or-later | ||
|
||
package main_ltp_loader; | ||
use strict; | ||
use warnings; | ||
use base 'Exporter'; | ||
use Exporter; | ||
|
||
our @EXPORT_OK = qw(load_kernel_tests); | ||
|
||
# Isolate the loading of LTP tests because they often rely on newer features | ||
# not present on all workers. If they are isolated then only the LTP tests | ||
# will fail to load when there is a version mismatch instead of all tests. | ||
local $@; | ||
eval "use main_ltp 'load_kernel_tests'"; | ||
if ($@) { | ||
bmwqemu::fctwarn("Failed to load main_ltp.pm:\n$@", 'main_ltp.pm'); | ||
eval q%{ | ||
sub load_kernel_tests { | ||
die "Can not run kernel tests because evaluating main_ltp.pm failed" | ||
if is_kernel_test; | ||
return 0; | ||
} | ||
%; | ||
} | ||
|
||
1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters