Skip to content

Commit

Permalink
testmap: move testmap to lib/
Browse files Browse the repository at this point in the history
This file gets used exactly once from task/, exactly once from machine/
and a whole lot from the various scripts.  It's the perfect candidate
for lib/!
  • Loading branch information
allisonkarlitskaya authored and martinpitt committed Mar 9, 2021
1 parent b73bdcd commit 7a3c719
Show file tree
Hide file tree
Showing 10 changed files with 14 additions and 9 deletions.
2 changes: 1 addition & 1 deletion image-download
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ from lib.constants import IMAGES_DIR
from lib.directories import get_images_data_dir
from lib.stores import PUBLIC_STORES, REDHAT_STORES, CA_PEM

from task.testmap import get_test_image
from lib.testmap import get_test_image

CONFIG = "~/.config/image-stores"

Expand Down
3 changes: 2 additions & 1 deletion image-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,10 @@ import subprocess
import sys

import task
from task import github, testmap
from task import github

from lib.constants import BOTS_DIR
from lib import testmap


sys.dont_write_bytecode = True
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion machine/testvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
from lib.constants import BOTS_DIR, TEST_DIR, IMAGES_DIR, SCRIPTS_DIR, DEFAULT_IMAGE, TEST_OS_DEFAULT
from lib.directories import get_images_data_dir
from machine_core.cli import cmd_cli
from task.testmap import get_build_image, get_test_image
from lib.testmap import get_build_image, get_test_image


__all__ = [
Expand Down
3 changes: 2 additions & 1 deletion po-refresh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ import sys
sys.dont_write_bytecode = True

import task
from task import github, testmap
from task import github
from lib.constants import BASE_DIR
from lib import testmap


def run(context, verbose=False, **kwargs):
Expand Down
3 changes: 2 additions & 1 deletion store-tests
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ import re
from datetime import datetime

from lib.stores import CA_PEM
from task import github, testmap
from lib import testmap
from task import github

# Result line has form like:
# ok 2 test/verify/check-accounts TestAccounts.testExpire [ND@1]
Expand Down
2 changes: 1 addition & 1 deletion task/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
import subprocess
import re

from task.testmap import known_context
from lib.testmap import known_context
from . import cache

__all__ = (
Expand Down
2 changes: 1 addition & 1 deletion tests-policy
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ FLAKE_THRESHOLD = 0.4

from task import github
from lib.constants import BOTS_DIR
from task.testmap import get_test_image
from lib.testmap import get_test_image


def main():
Expand Down
3 changes: 2 additions & 1 deletion tests-scan
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ sys.dont_write_bytecode = True
logging.basicConfig(level=logging.INFO)

from lib.stores import redhat_network
from task import github, labels_of_pull, distributed_queue, testmap
from task import github, labels_of_pull, distributed_queue
from lib import testmap

no_amqp = False
try:
Expand Down
3 changes: 2 additions & 1 deletion tests-trigger
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ import sys

sys.dont_write_bytecode = True

from task import github, testmap
from lib import testmap
from task import github


def trigger_pull(api, opts):
Expand Down

0 comments on commit 7a3c719

Please sign in to comment.