Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified smart_tests/jar/exe_deploy.jar
Binary file not shown.
37 changes: 22 additions & 15 deletions smart_tests/test_runners/karma.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# This runner only supports recording tests
# For subsetting, use 'ng' test runner instead
# It's possible to use 'karma' runner for recording, and 'ng' runner for subsetting, for the same test session
import json
from typing import Annotated, Dict, Generator, List

Expand All @@ -12,18 +9,6 @@
from . import smart_tests


@smart_tests.subset
def subset(client, _with: Annotated[str | None, typer.Option(
'--with', help="Specify 'ng' to use the Angular test runner for subsetting")] = None, ):
# TODO: implement the --with ng option

# read lines as test file names
for t in client.stdin():
client.test_path(t.rstrip("\n"))

client.run()


@smart_tests.record.tests
def record_tests(client,
reports: Annotated[List[str], typer.Argument(multiple=True, help="Test report files to process")],
Expand All @@ -32,6 +17,28 @@ def record_tests(client,

for r in reports:
client.report(r)
client.run()


@smart_tests.subset
def subset(client, _with: Annotated[str | None, typer.Option(
'--with', help='Format output for specific test runner (e.g., "ng" for Angular CLI)')] = None, ):
"""
Usage:
find src -name "*.spec.ts" -o -name "*.spec.js" > test-list.txt
cat test-list.txt | launchable subset --target 10% karma

# Output in ng test format
find src -name "*.spec.ts" | launchable subset --target 10% karma --with ng
"""
for t in client.stdin():
path = t.strip()
if path:
client.test_path(path)

if _with == 'ng':
client.formatter = lambda x: "--include={}".format(x[0]['name'])
client.separator = " "

client.run()

Expand Down
22 changes: 0 additions & 22 deletions smart_tests/test_runners/ng.py

This file was deleted.

2 changes: 1 addition & 1 deletion src/main/java/com/launchableinc/ingest/commits/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ java_library(

java_binary(
name = "exe",
main_class = "com.launchableinc.ingest.commits.CommitIngester",
main_class = "com.launchableinc.ingest.commits.Main",
runtime_deps = [
":commits",
"@maven//:org_slf4j_slf4j_jdk14",
Expand Down
Loading
Loading