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

[SR-1691] Run longer tests first #44300

Open
gribozavr opened this issue Jun 6, 2016 · 6 comments
Open

[SR-1691] Run longer tests first #44300

gribozavr opened this issue Jun 6, 2016 · 6 comments
Labels
feature A feature request or implementation good first issue Good for newcomers python Flag: Python source code test suite Area: test suite

Comments

@gribozavr
Copy link
Contributor

Previous ID SR-1691
Radar None
Original Reporter @gribozavr
Type New Feature
Additional Detail from JIRA
Votes 0
Component/s Project Infrastructure
Labels New Feature, Python, StarterBug
Assignee None
Priority Medium

md5: d2501feeca870b45e5e159e000fd4619

Issue Description:

In the Swift testsuite there many short tests and a few long tests. Sometimes the longer tests happen to be scheduled last, creating a "long tail" and keeping just a few cores busy. It would be better to start the longer tests first, and then run the short tests. This can shave off 1..2 minutes from testing time.

The suggested solution is to add a new feature to lit, that would allow to attach arbitrary labels to tests. lit could embed definition of special label type, or test suite could have extra code to take specific label names and then attach more semantic attributes to test.

// RUN: some-long-test
// LABEL: run_first

We could also migrate the limit_to_features feature to use labels, it would be a much better fit.

@ddunbar
Copy link
Contributor

ddunbar commented Jun 6, 2016

This is a good starter bug for learning about how lit and the Swift testing infrastructure works.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
@AnthonyLatsis AnthonyLatsis added test suite Area: test suite feature A feature request or implementation and removed new feature labels Nov 10, 2022
@Rajveer100
Copy link
Contributor

Rajveer100 commented Feb 9, 2023

An idea for this is very similar to C++ pair-sort using std::sort in which the we can store the tests in this fashion std::vector<std::pair<int, {id_type}>>, and then use std::sort(v.rbegin(), v.rend()), so that could do the work, once we can assign the appropriate id type for each test...and maybe later using lambda comparators.

@Rajveer100
Copy link
Contributor

Rajveer100 commented Feb 10, 2023

So how would it start, I mean what could be the potential first step...

@Rajveer100
Copy link
Contributor

@AnthonyLatsis

@AnthonyLatsis
Copy link
Collaborator

I am not familiar with this area; @ddunbar might have some advice.

@Rajveer100
Copy link
Contributor

Cool! @ddunbar please reply...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature A feature request or implementation good first issue Good for newcomers python Flag: Python source code test suite Area: test suite
Projects
None yet
Development

No branches or pull requests

4 participants