Skip to content

Conversation

jnohlgard
Copy link
Member

Will print some statistics after the test finishes:

...
2016-02-16 08:28:11,859 - INFO # Min/max error: 0/9
2016-02-16 08:28:11,859 - INFO # 
2016-02-16 08:28:11,860 - INFO # Test complete.

@jnohlgard jnohlgard added Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation Area: tests Area: tests and testing framework Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Area: timers Area: timer subsystems labels Feb 16, 2016
@OlegHahm OlegHahm assigned A-Paul and unassigned OlegHahm Feb 16, 2016
if (res[i] < min_diff) {
min_diff = res[i];
}

if (res[i] < -1000 || res[i] > 1000) {
puts("too large difference.\n");
puts("Test Failed.\n");
return 1;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will skip the output of the elaborate statistic. :-)

@A-Paul
Copy link
Member

A-Paul commented Feb 19, 2016

@gebart, good idea. I like statistics. :)

To print the min/max values in any case you may replace line 57-67 with this:

    }

    printf("\nMin/max error: %" PRId32 "/%" PRId32 "\n", min_diff, max_diff);

    if (min_diff < -1000 || max_diff > 1000) {
        puts("too large difference.\n");
        puts("Test Failed.\n");
        return 1;
    }

    printf("\nTest complete.\n");
    return 0;

@jnohlgard jnohlgard force-pushed the pr/xtimer-tests-usleep-until-stats branch from c376f85 to 4b47c3e Compare February 22, 2016 16:55
@jnohlgard
Copy link
Member Author

@A-Paul
applied the suggested change and immediately squashed.

@jnohlgard jnohlgard added the CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR label Feb 22, 2016
@A-Paul
Copy link
Member

A-Paul commented Feb 23, 2016

@gebart thanks for applying changes. Did a quick test on *arduino-due' and 'native'. O.K. and ACK.

@A-Paul
Copy link
Member

A-Paul commented Feb 23, 2016

Merging.

A-Paul pushed a commit that referenced this pull request Feb 23, 2016
tests/xtimer_usleep_until: Print statistics at the end
@A-Paul A-Paul merged commit 19c48d7 into RIOT-OS:master Feb 23, 2016
@jnohlgard
Copy link
Member Author

Thanks for a well-done review!

@jnohlgard jnohlgard deleted the pr/xtimer-tests-usleep-until-stats branch February 23, 2016 18:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: tests Area: tests and testing framework Area: timers Area: timer subsystems CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Impact: minor The PR is small in size and might only require a quick look of a knowledgeable reviewer Type: enhancement The issue suggests enhanceable parts / The PR enhances parts of the codebase / documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants