Changeset 4b54bd9 in mainline


Ignore:
Timestamp:
2018-09-12T13:23:03Z (6 years ago)
Author:
Vojtech Horky <vojtech.horky@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
3da0ee4
Parents:
275530a4
Message:

Update PCUT to latest revision

Location:
uspace/lib/pcut
Files:
1 added
1 deleted
39 edited

Legend:

Unmodified
Added
Removed
  • uspace/lib/pcut/Makefile

    r275530a4 r4b54bd9  
    2323        $(PCUT_TEST_PREFIX)testlist$(PCUT_TEST_SUFFIX) \
    2424        $(PCUT_TEST_PREFIX)timeout$(PCUT_TEST_SUFFIX) \
    25         $(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX)
     25        $(PCUT_TEST_PREFIX)xmlreport$(PCUT_TEST_SUFFIX) 
    2626
    2727EXTRA_CLEAN = $(SELF_TESTS)
  • uspace/lib/pcut/helenos.mak

    r275530a4 r4b54bd9  
    3030        src/os/helenos.c \
    3131        src/assert.c \
     32        src/helper.c \
    3233        src/list.c \
    3334        src/main.c \
     
    3839        src/run.c
    3940
    40 EXTRA_CFLAGS = -D__helenos__
     41EXTRA_CFLAGS = -D__helenos__ -Wno-unknown-pragmas
    4142
    4243LIBRARY = libpcut
  • uspace/lib/pcut/include/pcut/asserts.h

    r275530a4 r4b54bd9  
    7777 * @param size Size of the buffer.
    7878 */
    79 void pcut_str_error(errno_t error, char *buffer, int size);
     79void pcut_str_error(int error, char *buffer, int size);
    8080
    8181/** Raise assertion error (internal version).
     
    264264#define PCUT_ASSERT_ERRNO_VAL_WITH_NAME(expected_value, expected_quoted, actual_value) \
    265265        do {\
    266                 errno_t pcut_expected_eval = (expected_value); \
    267                 errno_t pcut_actual_eval = (actual_value); \
     266                int pcut_expected_eval = (expected_value); \
     267                int pcut_actual_eval = (actual_value); \
    268268                if (pcut_expected_eval != pcut_actual_eval) { \
    269269                        char pcut_expected_description[100]; \
  • uspace/lib/pcut/src/assert.c

    r275530a4 r4b54bd9  
    4343
    4444#include "internal.h"
     45
     46#pragma warning(push, 0)
    4547#include <setjmp.h>
    4648#include <stdarg.h>
    4749#include <stdio.h>
     50#pragma warning(pop)
     51
    4852
    4953/** Maximum length of failed-assert message. */
     
    5963static int message_buffer_index = 0;
    6064
    61 void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...)
    62 {
     65void pcut_failed_assertion_fmt(const char *filename, int line, const char *fmt, ...) {
    6366        va_list args;
    6467        char *current_buffer = message_buffer[message_buffer_index];
     
    6669        message_buffer_index = (message_buffer_index + 1) % MESSAGE_BUFFER_COUNT;
    6770
    68         snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
     71        pcut_snprintf(current_buffer, MAX_MESSAGE_LENGTH, "%s:%d: ", filename, line);
    6972        offset = pcut_str_size(current_buffer);
    7073
  • uspace/lib/pcut/src/internal.h

    r275530a4 r4b54bd9  
    3535
    3636#include <pcut/pcut.h>
     37
     38#pragma warning(push, 0)
    3739#include <stdlib.h>
     40#pragma warning(pop)
    3841
    3942
     
    4851 */
    4952#ifdef PCUT_DEBUG_BUILD
     53#pragma warning(push, 0)
    5054#include <stdio.h>
     55#pragma warning(pop)
    5156#define PCUT_DEBUG_INTERNAL(msg, ...) \
    5257        fprintf(stderr, "[PCUT %s:%d]: " msg "%s", __FILE__, __LINE__, __VA_ARGS__)
     
    7883 */
    7984#define PCUT_RUN_MODE_SINGLE 2
    80 
    81 /*
    82  * Use sprintf_s in Windows but only with Microsoft compiler.
    83  * Namely, let MinGW use snprintf.
    84  */
    85 #if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
    86 #define snprintf sprintf_s
    87 #endif
    8885
    8986extern int pcut_run_mode;
     
    125122        /** Test completed. */
    126123        void (*test_done)(pcut_item_t *, int, const char *, const char *,
    127             const char *);
     124                const char *);
    128125};
    129126
     
    135132void pcut_report_test_start(pcut_item_t *test);
    136133void pcut_report_test_done(pcut_item_t *test, int outcome,
    137     const char *error_message, const char *teardown_error_message,
    138     const char *extra_output);
     134                const char *error_message, const char *teardown_error_message,
     135                const char *extra_output);
    139136void pcut_report_test_done_unparsed(pcut_item_t *test, int outcome,
    140     const char *unparsed_output, size_t unparsed_output_size);
     137                const char *unparsed_output, size_t unparsed_output_size);
    141138void pcut_report_done(void);
    142139
     
    187184char *pcut_str_find_char(const char *haystack, const char needle);
    188185
     186/** Format string to a buffer.
     187 *
     188 */
     189int pcut_snprintf(char *dest, size_t size, const char *format, ...);
    189190
    190191#endif
  • uspace/lib/pcut/src/list.c

    r275530a4 r4b54bd9  
    3232 */
    3333
     34#pragma warning(push, 0)
    3435#include <assert.h>
    3536#include <stdlib.h>
     37#pragma warning(pop)
     38
    3639#include "internal.h"
    3740#include <pcut/pcut.h>
     
    4346 * @return First item with actual content or NULL on end of list.
    4447 */
    45 pcut_item_t *pcut_get_real_next(pcut_item_t *item)
    46 {
     48pcut_item_t *pcut_get_real_next(pcut_item_t *item) {
    4749        if (item == NULL) {
    4850                return NULL;
     
    6567 * @return First item with actual content or NULL on end of list.
    6668 */
    67 pcut_item_t *pcut_get_real(pcut_item_t *item)
    68 {
     69pcut_item_t *pcut_get_real(pcut_item_t *item) {
    6970        if (item == NULL) {
    7071                return NULL;
     
    8384 * @param nested Head of the nested list.
    8485 */
    85 static void inline_nested_lists(pcut_item_t *nested)
    86 {
     86static void inline_nested_lists(pcut_item_t *nested) {
    8787        pcut_item_t *first;
    8888
     
    111111 * @param first List head.
    112112 */
    113 static void set_ids(pcut_item_t *first)
    114 {
     113static void set_ids(pcut_item_t *first) {
    115114        int id = 1;
    116115        pcut_item_t *it;
     
    135134 * @param first Head of the list.
    136135 */
    137 static void detect_skipped_tests(pcut_item_t *first)
    138 {
     136static void detect_skipped_tests(pcut_item_t *first) {
    139137        pcut_item_t *it;
    140138
     
    172170 * @return Head of the fixed list.
    173171 */
    174 pcut_item_t *pcut_fix_list_get_real_head(pcut_item_t *last)
    175 {
     172pcut_item_t *pcut_fix_list_get_real_head(pcut_item_t *last) {
    176173        pcut_item_t *next, *it;
    177174
     
    201198 * @return Number of tests.
    202199 */
    203 int pcut_count_tests(pcut_item_t *it)
    204 {
     200int pcut_count_tests(pcut_item_t *it) {
    205201        int count = 0;
    206202        while (it != NULL) {
  • uspace/lib/pcut/src/main.c

    r275530a4 r4b54bd9  
    3434#include "internal.h"
    3535#include "report/report.h"
     36
     37#pragma warning(push, 0)
    3638#include <assert.h>
    3739#include <stdlib.h>
    3840#include <stdio.h>
     41#pragma warning(pop)
     42
    3943
    4044/** Current running mode. */
     
    5761 * @return Whether @p arg is @p opt followed by a number.
    5862 */
    59 int pcut_is_arg_with_number(const char *arg, const char *opt, int *value)
    60 {
     63int pcut_is_arg_with_number(const char *arg, const char *opt, int *value) {
    6164        int opt_len = pcut_str_size(opt);
    62         if (!pcut_str_start_equals(arg, opt, opt_len)) {
     65        if (! pcut_str_start_equals(arg, opt, opt_len)) {
    6366                return 0;
    6467        }
     
    7578 * @retval NULL No item with such id exists in the list.
    7679 */
    77 static pcut_item_t *pcut_find_by_id(pcut_item_t *first, int id)
    78 {
     80static pcut_item_t *pcut_find_by_id(pcut_item_t *first, int id) {
    7981        pcut_item_t *it = pcut_get_real(first);
    8082        while (it != NULL) {
     
    9496 * @return Error code.
    9597 */
    96 static int run_suite(pcut_item_t *suite, pcut_item_t **last, const char *prog_path)
    97 {
     98static int run_suite(pcut_item_t *suite, pcut_item_t **last, const char *prog_path) {
    9899        int is_first_test = 1;
    99100        int total_count = 0;
     
    159160 * @param first First item of the list.
    160161 */
    161 static void set_setup_teardown_callbacks(pcut_item_t *first)
    162 {
     162static void set_setup_teardown_callbacks(pcut_item_t *first) {
    163163        pcut_item_t *active_suite = NULL;
    164164        pcut_item_t *it;
     
    192192 * @return Program exit code.
    193193 */
    194 int pcut_main(pcut_item_t *last, int argc, char *argv[])
    195 {
     194int pcut_main(pcut_item_t *last, int argc, char *argv[]) {
    196195        pcut_item_t *items = pcut_fix_list_get_real_head(last);
    197196        pcut_item_t *it;
  • uspace/lib/pcut/src/os/generic.c

    r275530a4 r4b54bd9  
    3131 * Platform-dependent test execution function when system() is available.
    3232 */
    33 
     33#pragma warning(push, 0)
    3434#include <stdlib.h>
    3535#include <stdio.h>
     
    3838#include <assert.h>
    3939#include <string.h>
     40#pragma warning(pop)
     41
    4042#include "../internal.h"
    4143
     
    5557
    5658#define FORMAT_COMMAND(buffer, buffer_size, self_path, test_id, temp_file) \
    57         snprintf(buffer, buffer_size, "\"\"%s\" -t%d >%s\"", self_path, test_id, temp_file)
     59        pcut_snprintf(buffer, buffer_size, "\"\"%s\" -t%d >%s\"", self_path, test_id, temp_file)
    5860#define FORMAT_TEMP_FILENAME(buffer, buffer_size) \
    59         snprintf(buffer, buffer_size, "pcut_%d.tmp", _getpid())
     61        pcut_snprintf(buffer, buffer_size, "pcut_%d.tmp", _getpid())
    6062
    6163#elif defined(__unix)
     
    6365
    6466#define FORMAT_COMMAND(buffer, buffer_size, self_path, test_id, temp_file) \
    65         snprintf(buffer, buffer_size, "%s -t%d &>%s", self_path, test_id, temp_file)
     67        pcut_snprintf(buffer, buffer_size, "%s -t%d &>%s", self_path, test_id, temp_file)
    6668#define FORMAT_TEMP_FILENAME(buffer, buffer_size) \
    67         snprintf(buffer, buffer_size, "pcut_%d.tmp", getpid())
     69        pcut_snprintf(buffer, buffer_size, "pcut_%d.tmp", getpid())
    6870
    6971#else
     
    8183 * @param test Test that is about to start.
    8284 */
    83 static void before_test_start(pcut_item_t *test)
    84 {
     85static void before_test_start(pcut_item_t *test) {
    8586        pcut_report_test_start(test);
    8687
     
    9495 * @return Test outcome code.
    9596 */
    96 static int convert_wait_status_to_outcome(int status)
    97 {
     97static int convert_wait_status_to_outcome(int status) {
    9898        if (status < 0) {
    9999                return PCUT_OUTCOME_INTERNAL_ERROR;
     
    110110 * @param test Test to be run.
    111111 */
    112 int pcut_run_test_forking(const char *self_path, pcut_item_t *test)
    113 {
     112int pcut_run_test_forking(const char *self_path, pcut_item_t *test) {
    114113        int rc, outcome;
    115114        FILE *tempfile;
     
    121120        FORMAT_TEMP_FILENAME(tempfile_name, PCUT_TEMP_FILENAME_BUFFER_SIZE - 1);
    122121        FORMAT_COMMAND(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
    123             self_path, (test)->id, tempfile_name);
    124 
     122                self_path, (test)->id, tempfile_name);
     123       
    125124        PCUT_DEBUG("Will execute <%s> (temp file <%s>) with system().",
    126             command, tempfile_name);
     125                command, tempfile_name);
    127126
    128127        rc = system(command);
     
    147146}
    148147
    149 void pcut_hook_before_test(pcut_item_t *test)
    150 {
     148void pcut_hook_before_test(pcut_item_t *test) {
    151149        PCUT_UNUSED(test);
    152150
  • uspace/lib/pcut/src/os/helenos.c

    r275530a4 r4b54bd9  
    4646/* String functions. */
    4747
    48 int pcut_str_equals(const char *a, const char *b)
    49 {
     48int pcut_str_equals(const char *a, const char *b) {
    5049        return str_cmp(a, b) == 0;
    5150}
    5251
    5352
    54 int pcut_str_start_equals(const char *a, const char *b, int len)
    55 {
     53int pcut_str_start_equals(const char *a, const char *b, int len) {
    5654        return str_lcmp(a, b, len) == 0;
    5755}
    5856
    59 int pcut_str_size(const char *s)
    60 {
     57int pcut_str_size(const char *s) {
    6158        return str_size(s);
    6259}
    6360
    64 int pcut_str_to_int(const char *s)
    65 {
     61int pcut_str_to_int(const char *s) {
    6662        int result = strtol(s, NULL, 10);
    6763        return result;
    6864}
    6965
    70 char *pcut_str_find_char(const char *haystack, const char needle)
    71 {
     66char *pcut_str_find_char(const char *haystack, const char needle) {
    7267        return str_chr(haystack, needle);
    7368}
    7469
    75 void pcut_str_error(errno_t error, char *buffer, int size)
    76 {
     70void pcut_str_error(int error, char *buffer, int size) {
    7771        const char *str = str_error(error);
    7872        if (str == NULL) {
     
    107101 * @param test Test that is about to be run.
    108102 */
    109 static void before_test_start(pcut_item_t *test)
    110 {
     103static void before_test_start(pcut_item_t *test) {
    111104        pcut_report_test_start(test);
    112105
     
    116109
    117110/** Mutex guard for forced_termination_cv. */
    118 static fibril_mutex_t forced_termination_mutex =
    119     FIBRIL_MUTEX_INITIALIZER(forced_termination_mutex);
     111static fibril_mutex_t forced_termination_mutex
     112        = FIBRIL_MUTEX_INITIALIZER(forced_termination_mutex);
    120113
    121114/** Condition-variable for checking whether test timed-out. */
    122 static fibril_condvar_t forced_termination_cv =
    123     FIBRIL_CONDVAR_INITIALIZER(forced_termination_cv);
     115static fibril_condvar_t forced_termination_cv
     116        = FIBRIL_CONDVAR_INITIALIZER(forced_termination_cv);
    124117
    125118/** Spawned task id. */
     
    137130 * @return EOK Always.
    138131 */
    139 static errno_t test_timeout_handler_fibril(void *arg)
    140 {
     132static int test_timeout_handler_fibril(void *arg) {
    141133        pcut_item_t *test = arg;
    142134        int timeout_sec = pcut_get_test_timeout(test);
     
    148140        }
    149141        errno_t rc = fibril_condvar_wait_timeout(&forced_termination_cv,
    150             &forced_termination_mutex, timeout_us);
     142                &forced_termination_mutex, timeout_us);
    151143        if (rc == ETIMEOUT) {
    152144                task_kill(test_task_id);
     
    162154 * @param test Test to be run.
    163155 */
    164 int pcut_run_test_forking(const char *self_path, pcut_item_t *test)
    165 {
     156int pcut_run_test_forking(const char *self_path, pcut_item_t *test) {
    166157        before_test_start(test);
    167158
     
    235226}
    236227
    237 void pcut_hook_before_test(pcut_item_t *test)
    238 {
     228void pcut_hook_before_test(pcut_item_t *test) {
    239229        PCUT_UNUSED(test);
    240230
  • uspace/lib/pcut/src/os/stdc.c

    r275530a4 r4b54bd9  
    3232 */
    3333
     34#pragma warning(push, 0)
    3435#include <string.h>
     36#pragma warning(pop)
     37
    3538#include "../internal.h"
    3639
    37 int pcut_str_equals(const char *a, const char *b)
    38 {
     40int pcut_str_equals(const char *a, const char *b) {
    3941        return strcmp(a, b) == 0;
    4042}
    4143
    42 int pcut_str_start_equals(const char *a, const char *b, int len)
    43 {
     44int pcut_str_start_equals(const char *a, const char *b, int len) {
    4445        return strncmp(a, b, len) == 0;
    4546}
    4647
    47 int pcut_str_size(const char *s)
    48 {
     48int pcut_str_size(const char *s) {
    4949        return strlen(s);
    5050}
    5151
    52 int pcut_str_to_int(const char *s)
    53 {
     52int pcut_str_to_int(const char *s) {
    5453        return atoi(s);
    5554}
    5655
    57 char *pcut_str_find_char(const char *haystack, const char needle)
    58 {
     56char *pcut_str_find_char(const char *haystack, const char needle) {
    5957        return strchr(haystack, needle);
    6058}
    6159
    62 void pcut_str_error(int error, char *buffer, int size)
    63 {
     60void pcut_str_error(int error, char *buffer, int size) {
    6461        const char *str = strerror(error);
    6562        if (str == NULL) {
  • uspace/lib/pcut/src/os/unix.c

    r275530a4 r4b54bd9  
    6464 * @param test Test that is about to be run.
    6565 */
    66 static void before_test_start(pcut_item_t *test)
    67 {
     66static void before_test_start(pcut_item_t *test) {
    6867        pcut_report_test_start(test);
    6968
     
    7978 * @param sig Signal number.
    8079 */
    81 static void kill_child_on_alarm(int sig)
    82 {
     80static void kill_child_on_alarm(int sig) {
    8381        PCUT_UNUSED(sig);
    8482        kill(child_pid, SIGKILL);
     
    9694 * @return Number of actually read bytes.
    9795 */
    98 static size_t read_all(int fd, char *buffer, size_t buffer_size)
    99 {
     96static size_t read_all(int fd, char *buffer, size_t buffer_size) {
    10097        ssize_t actually_read;
    10198        char *buffer_start = buffer;
     
    124121 * @return Test outcome code.
    125122 */
    126 static int convert_wait_status_to_outcome(int status)
    127 {
     123static int convert_wait_status_to_outcome(int status) {
    128124        if (WIFEXITED(status)) {
    129125                if (WEXITSTATUS(status) != 0) {
     
    146142 * @param test Test to be run.
    147143 */
    148 int pcut_run_test_forking(const char *self_path, pcut_item_t *test)
    149 {
     144int pcut_run_test_forking(const char *self_path, pcut_item_t *test) {
    150145        int link_stdout[2], link_stderr[2];
    151146        int rc, status, outcome;
     
    159154        rc = pipe(link_stdout);
    160155        if (rc == -1) {
    161                 snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
    162                     "pipe() failed: %s.", strerror(rc));
     156                pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
     157                                "pipe() failed: %s.", strerror(rc));
    163158                pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
    164159                return PCUT_OUTCOME_INTERNAL_ERROR;
     
    166161        rc = pipe(link_stderr);
    167162        if (rc == -1) {
    168                 snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
    169                     "pipe() failed: %s.", strerror(rc));
     163                pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
     164                                "pipe() failed: %s.", strerror(rc));
    170165                pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
    171166                return PCUT_OUTCOME_INTERNAL_ERROR;
     
    174169        child_pid = fork();
    175170        if (child_pid == (pid_t)-1) {
    176                 snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
    177                     "fork() failed: %s.", strerror(rc));
     171                pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
     172                        "fork() failed: %s.", strerror(rc));
    178173                outcome = PCUT_OUTCOME_INTERNAL_ERROR;
    179174                goto leave_close_pipes;
     
    220215}
    221216
    222 void pcut_hook_before_test(pcut_item_t *test)
    223 {
     217void pcut_hook_before_test(pcut_item_t *test) {
    224218        PCUT_UNUSED(test);
    225219
  • uspace/lib/pcut/src/os/windows.c

    r275530a4 r4b54bd9  
    3939#include "../internal.h"
    4040
     41#pragma warning(push, 0)
    4142#include <windows.h>
    4243#include <tchar.h>
    4344#include <stdio.h>
    4445#include <strsafe.h>
     46#pragma warning(pop)
     47
    4548
    4649
     
    6164 * @param test Test that is about to be run.
    6265 */
    63 static void before_test_start(pcut_item_t *test)
    64 {
     66static void before_test_start(pcut_item_t *test) {
    6567        pcut_report_test_start(test);
    6668
     
    7476 * @param failed_function_name Name of the failed function.
    7577 */
    76 static void report_func_fail(pcut_item_t *test, const char *failed_function_name)
    77 {
     78static void report_func_fail(pcut_item_t *test, const char *failed_function_name) {
    7879        /* TODO: get error description. */
    79         sprintf_s(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
    80             "%s failed: %s.", failed_function_name, "unknown reason");
    81         pcut_report_test_done(test, TEST_OUTCOME_ERROR, error_message_buffer, NULL, NULL);
     80        pcut_snprintf(error_message_buffer, OUTPUT_BUFFER_SIZE - 1,
     81                "%s failed: %s.", failed_function_name, "unknown reason");
     82        pcut_report_test_done(test, PCUT_OUTCOME_INTERNAL_ERROR, error_message_buffer, NULL, NULL);
    8283}
    8384
     
    9394 * @return Number of actually read bytes.
    9495 */
    95 static size_t read_all(HANDLE fd, char *buffer, size_t buffer_size)
    96 {
     96static size_t read_all(HANDLE fd, char *buffer, size_t buffer_size) {
    9797        DWORD actually_read;
    9898        char *buffer_start = buffer;
     
    128128};
    129129
    130 static DWORD WINAPI read_test_output_on_background(LPVOID test_output_data_ptr)
    131 {
     130static DWORD WINAPI read_test_output_on_background(LPVOID test_output_data_ptr) {
    132131        size_t stderr_size = 0;
    133132        struct test_output_data *test_output_data = (struct test_output_data *) test_output_data_ptr;
    134133
    135134        stderr_size = read_all(test_output_data->pipe_stderr,
    136             test_output_data->output_buffer,
    137             test_output_data->output_buffer_size - 1);
     135                test_output_data->output_buffer,
     136                test_output_data->output_buffer_size - 1);
    138137        read_all(test_output_data->pipe_stdout,
    139             test_output_data->output_buffer,
    140             test_output_data->output_buffer_size - 1 - stderr_size);
     138                test_output_data->output_buffer,
     139                test_output_data->output_buffer_size - 1 - stderr_size);
    141140
    142141        return 0;
     
    148147 * @param test Test to be run.
    149148 */
    150 int pcut_run_test_forking(const char *self_path, pcut_item_t *test)
    151 {
     149int pcut_run_test_forking(const char *self_path, pcut_item_t *test) {
    152150        /* TODO: clean-up if something goes wrong "in the middle" */
    153151        BOOL okay = FALSE;
     
    220218
    221219        /* Format the command line. */
    222         sprintf_s(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
    223             "\"%s\" -t%d", self_path, test->id);
     220        pcut_snprintf(command, PCUT_COMMAND_LINE_BUFFER_SIZE - 1,
     221                "\"%s\" -t%d", self_path, test->id);
    224222
    225223        /* Run the process. */
    226224        okay = CreateProcess(NULL, command, NULL, NULL, TRUE, 0, NULL, NULL,
    227             &start_info, &process_info);
     225                &start_info, &process_info);
    228226
    229227        if (!okay) {
     
    267265
    268266        test_output_thread_reader = CreateThread(NULL, 0,
    269             read_test_output_on_background, &test_output_data,
    270             0, NULL);
     267                read_test_output_on_background, &test_output_data,
     268                0, NULL);
    271269
    272270        if (test_output_thread_reader == NULL) {
     
    286284                if (!okay) {
    287285                        report_func_fail(test, "TerminateProcess(/* PROCESS_INFORMATION.hProcess */)");
    288                         return PCUT_ERROR_INTERNAL_FAILURE;
     286                        return PCUT_OUTCOME_INTERNAL_ERROR;
    289287                }
    290288                rc = WaitForSingleObject(process_info.hProcess, INFINITE);
     
    314312        if (rc != WAIT_OBJECT_0) {
    315313                report_func_fail(test, "WaitForSingleObject(/* stdout reader thread */)");
    316                 return PCUT_ERROR_INTERNAL_FAILURE;
     314                return PCUT_OUTCOME_INTERNAL_ERROR;
    317315        }
    318316
     
    322320}
    323321
    324 void pcut_hook_before_test(pcut_item_t *test)
    325 {
     322void pcut_hook_before_test(pcut_item_t *test) {
    326323        PCUT_UNUSED(test);
    327324
  • uspace/lib/pcut/src/preproc.c

    r275530a4 r4b54bd9  
    2727 */
    2828
    29 #include <stdbool.h>
     29#pragma warning(push, 0)
    3030#include <stdio.h>
    3131#include <stdlib.h>
    3232#include <ctype.h>
    3333#include <string.h>
     34#pragma warning(pop)
     35
    3436
    3537#define MAX_IDENTIFIER_LENGTH 256
     
    3739static int counter = 0;
    3840
    39 static void print_numbered_identifier(int value, FILE *output)
    40 {
     41static void print_numbered_identifier(int value, FILE *output) {
    4142        fprintf(output, "pcut_item_%d", value);
    4243}
    4344
    44 static void print_numbered_identifier2(int value, FILE *output)
    45 {
     45static void print_numbered_identifier2(int value, FILE *output) {
    4646        fprintf(output, "pcut_item2_%d", value);
    4747}
    4848
    49 static void print_numbered_identifier3(int value, FILE *output)
    50 {
     49static void print_numbered_identifier3(int value, FILE *output) {
    5150        fprintf(output, "pcut_item3_%d", value);
    5251}
     
    5756} identifier_t;
    5857
    59 static void identifier_init(identifier_t *identifier)
    60 {
     58static void identifier_init(identifier_t *identifier) {
    6159        identifier->name[0] = 0;
    6260        identifier->length = 0;
    6361}
    6462
    65 static void identifier_add_char(identifier_t *identifier, char c)
    66 {
     63static void identifier_add_char(identifier_t *identifier, char c) {
    6764        if (identifier->length + 1 >= MAX_IDENTIFIER_LENGTH) {
    6865                fprintf(stderr, "Identifier %s is too long, aborting!\n", identifier->name);
     
    7572}
    7673
    77 static void identifier_print_or_expand(identifier_t *identifier, FILE *output)
    78 {
     74static void identifier_print_or_expand(identifier_t *identifier, FILE *output) {
    7975        const char *name = identifier->name;
    8076        if (strcmp(name, "PCUT_ITEM_NAME") == 0) {
     
    9389}
    9490
    95 static int is_identifier_char(int c, int inside_identifier)
    96 {
    97         return isalpha(c) || (c == '_') || (inside_identifier && isdigit(c));
     91static int is_identifier_char(int c, int inside_identifier) {
     92        return isalpha(c) || (c == '_')
     93                        || (inside_identifier && isdigit(c));
    9894}
    9995
    100 int main(int argc, char *argv[])
    101 {
     96int main(int argc, char *argv[]) {
    10297        FILE *input = stdin;
    10398        FILE *output = stdout;
     
    110105        (void) argv;
    111106
    112         while (true) {
     107        while (1) {
    113108                int current_char_denotes_identifier;
    114109
  • uspace/lib/pcut/src/print.c

    r275530a4 r4b54bd9  
    3333
    3434#include <pcut/pcut.h>
     35
     36#pragma warning(push, 0)
    3537#include <stdio.h>
    3638#include <stdlib.h>
    3739#include <assert.h>
     40#pragma warning(pop)
     41
    3842#include "internal.h"
    3943
     
    4246 * @param first First item to be printed.
    4347 */
    44 void pcut_print_items(pcut_item_t *first)
    45 {
     48void pcut_print_items(pcut_item_t *first) {
    4649        pcut_item_t *it = first;
    4750        printf("====>\n");
     
    7275 * @param first First item to be printed.
    7376 */
    74 void pcut_print_tests(pcut_item_t *first)
    75 {
     77void pcut_print_tests(pcut_item_t *first) {
    7678        pcut_item_t *it;
    7779        for (it = pcut_get_real(first); it != NULL; it = pcut_get_real_next(it)) {
  • uspace/lib/pcut/src/report/report.c

    r275530a4 r4b54bd9  
    3333
    3434#include "../internal.h"
     35
    3536#ifdef __helenos__
    36 #include <str.h>
     37#include <mem.h>
    3738#else
     39#pragma warning(push, 0)
    3840#include <string.h>
     41#pragma warning(pop)
    3942#endif
    40 #include <stdbool.h>
     43
     44#pragma warning(push, 0)
    4145#include <stdio.h>
     46#pragma warning(pop)
     47
    4248
    4349/** Currently used report ops. */
     
    6874 * @param msg The message to be printed.
    6975 */
    70 void pcut_print_fail_message(const char *msg)
    71 {
     76void pcut_print_fail_message(const char *msg) {
    7277        if (msg == NULL) {
    7378                return;
     
    99104 */
    100105static void parse_command_output(const char *full_output, size_t full_output_size,
    101     char *stdio_buffer, size_t stdio_buffer_size,
    102     char *error_buffer, size_t error_buffer_size)
    103 {
     106                char *stdio_buffer, size_t stdio_buffer_size,
     107                char *error_buffer, size_t error_buffer_size) {
    104108        memset(stdio_buffer, 0, stdio_buffer_size);
    105109        memset(error_buffer, 0, error_buffer_size);
     
    111115        }
    112116
    113         while (true) {
     117        while (1) {
    114118                size_t message_length;
    115119
     
    157161 * @param ops Functions to use.
    158162 */
    159 void pcut_report_register_handler(pcut_report_ops_t *ops)
    160 {
     163void pcut_report_register_handler(pcut_report_ops_t *ops) {
    161164        report_ops = ops;
    162165}
     
    166169 * @param all_items List of all tests that could be run.
    167170 */
    168 void pcut_report_init(pcut_item_t *all_items)
    169 {
     171void pcut_report_init(pcut_item_t *all_items) {
    170172        REPORT_CALL(init, all_items);
    171173}
     
    175177 * @param suite Suite that was just started.
    176178 */
    177 void pcut_report_suite_start(pcut_item_t *suite)
    178 {
     179void pcut_report_suite_start(pcut_item_t *suite) {
    179180        REPORT_CALL(suite_start, suite);
    180181}
     
    184185 * @param suite Suite that just completed.
    185186 */
    186 void pcut_report_suite_done(pcut_item_t *suite)
    187 {
     187void pcut_report_suite_done(pcut_item_t *suite) {
    188188        REPORT_CALL(suite_done, suite);
    189189}
     
    193193 * @param test Test to be run just about now.
    194194 */
    195 void pcut_report_test_start(pcut_item_t *test)
    196 {
     195void pcut_report_test_start(pcut_item_t *test) {
    197196        REPORT_CALL(test_start, test);
    198197}
     
    207206 */
    208207void pcut_report_test_done(pcut_item_t *test, int outcome,
    209     const char *error_message, const char *teardown_error_message,
    210     const char *extra_output)
    211 {
     208                const char *error_message, const char *teardown_error_message,
     209                const char *extra_output) {
    212210        REPORT_CALL(test_done, test, outcome, error_message, teardown_error_message,
    213             extra_output);
     211                        extra_output);
    214212}
    215213
     
    222220 */
    223221void pcut_report_test_done_unparsed(pcut_item_t *test, int outcome,
    224     const char *unparsed_output, size_t unparsed_output_size)
    225 {
     222                const char *unparsed_output, size_t unparsed_output_size) {
    226223
    227224        parse_command_output(unparsed_output, unparsed_output_size,
    228             buffer_for_extra_output, BUFFER_SIZE,
    229             buffer_for_error_messages, BUFFER_SIZE);
     225                        buffer_for_extra_output, BUFFER_SIZE,
     226                        buffer_for_error_messages, BUFFER_SIZE);
    230227
    231228        pcut_report_test_done(test, outcome, buffer_for_error_messages, NULL, buffer_for_extra_output);
     
    235232 *
    236233 */
    237 void pcut_report_done(void)
    238 {
     234void pcut_report_done(void) {
    239235        REPORT_CALL_NO_ARGS(done);
    240236}
  • uspace/lib/pcut/src/report/tap.c

    r275530a4 r4b54bd9  
    3434#include "../internal.h"
    3535#include "report.h"
     36
    3637#ifndef __helenos__
     38#pragma warning(push, 0)
    3739#include <string.h>
     40#pragma warning(pop)
    3841#endif
     42
     43#pragma warning(push, 0)
    3944#include <stdio.h>
     45#pragma warning(pop)
     46
    4047
    4148/** Counter of all run tests. */
     
    5562 * @param all_items Start of the list with all items.
    5663 */
    57 static void tap_init(pcut_item_t *all_items)
    58 {
     64static void tap_init(pcut_item_t *all_items) {
    5965        int tests_total = pcut_count_tests(all_items);
    6066        test_counter = 0;
     
    6874 * @param suite Suite that just started.
    6975 */
    70 static void tap_suite_start(pcut_item_t *suite)
    71 {
     76static void tap_suite_start(pcut_item_t *suite) {
    7277        tests_in_suite = 0;
    7378        failed_tests_in_suite = 0;
     
    8085 * @param suite Suite that just ended.
    8186 */
    82 static void tap_suite_done(pcut_item_t *suite)
    83 {
     87static void tap_suite_done(pcut_item_t *suite) {
    8488        if (failed_tests_in_suite == 0) {
    8589                printf("#> Finished suite %s (passed).\n",
    86                     suite->name);
     90                                suite->name);
    8791        } else {
    8892                printf("#> Finished suite %s (failed %d of %d).\n",
    89                     suite->name, failed_tests_in_suite, tests_in_suite);
     93                                suite->name, failed_tests_in_suite, tests_in_suite);
    9094        }
    9195}
     
    97101 * @param test Test that is started.
    98102 */
    99 static void tap_test_start(pcut_item_t *test)
    100 {
     103static void tap_test_start(pcut_item_t *test) {
    101104        PCUT_UNUSED(test);
    102105
     
    110113 * @param prefix Prefix for each new line, such as comment character.
    111114 */
    112 static void print_by_lines(const char *message, const char *prefix)
    113 {
     115static void print_by_lines(const char *message, const char *prefix) {
    114116        char *next_line_start;
    115117        if ((message == NULL) || (message[0] == 0)) {
     
    137139 */
    138140static void tap_test_done(pcut_item_t *test, int outcome,
    139     const char *error_message, const char *teardown_error_message,
    140     const char *extra_output)
    141 {
     141                const char *error_message, const char *teardown_error_message,
     142                const char *extra_output) {
    142143        const char *test_name = test->name;
    143144        const char *status_str = NULL;
     
    172173
    173174/** Report testing done. */
    174 static void tap_done(void)
    175 {
     175static void tap_done(void) {
    176176        if (failed_test_counter == 0) {
    177177                printf("#> Done: all tests passed.\n");
  • uspace/lib/pcut/src/report/xml.c

    r275530a4 r4b54bd9  
    3434#include "../internal.h"
    3535#include "report.h"
     36
    3637#ifndef __helenos__
     38#pragma warning(push, 0)
    3739#include <string.h>
     40#pragma warning(pop)
    3841#endif
     42
     43#pragma warning(push, 0)
    3944#include <stdio.h>
     45#pragma warning(pop)
     46
    4047
    4148/** Counter of all run tests. */
     
    5259 * @param all_items Start of the list with all items.
    5360 */
    54 static void xml_init(pcut_item_t *all_items)
    55 {
     61static void xml_init(pcut_item_t *all_items) {
    5662        int tests_total = pcut_count_tests(all_items);
    5763        test_counter = 0;
     
    6571 * @param suite Suite that just started.
    6672 */
    67 static void xml_suite_start(pcut_item_t *suite)
    68 {
     73static void xml_suite_start(pcut_item_t *suite) {
    6974        tests_in_suite = 0;
    7075        failed_tests_in_suite = 0;
     
    7782 * @param suite Suite that just ended.
    7883 */
    79 static void xml_suite_done(pcut_item_t *suite)
    80 {
     84static void xml_suite_done(pcut_item_t *suite) {
    8185        printf("\t</suite><!-- %s: %d / %d -->\n", suite->name,
    82             failed_tests_in_suite, tests_in_suite);
     86                failed_tests_in_suite, tests_in_suite);
    8387}
    8488
     
    8993 * @param test Test that is started.
    9094 */
    91 static void xml_test_start(pcut_item_t *test)
    92 {
     95static void xml_test_start(pcut_item_t *test) {
    9396        PCUT_UNUSED(test);
    9497
     
    102105 * @param element_name Wrapping XML element name.
    103106 */
    104 static void print_by_lines(const char *message, const char *element_name)
    105 {
     107static void print_by_lines(const char *message, const char *element_name) {
    106108        char *next_line_start;
    107109
     
    135137 */
    136138static void xml_test_done(pcut_item_t *test, int outcome,
    137     const char *error_message, const char *teardown_error_message,
    138     const char *extra_output)
    139 {
     139                const char *error_message, const char *teardown_error_message,
     140                const char *extra_output) {
    140141        const char *test_name = test->name;
    141142        const char *status_str = NULL;
     
    158159
    159160        printf("\t\t<testcase name=\"%s\" status=\"%s\">\n", test_name,
    160             status_str);
     161                status_str);
    161162
    162163        print_by_lines(error_message, "error-message");
     
    169170
    170171/** Report testing done. */
    171 static void xml_done(void)
    172 {
     172static void xml_done(void) {
    173173        printf("</report>\n");
    174174}
  • uspace/lib/pcut/src/run.c

    r275530a4 r4b54bd9  
    3333
    3434#include "internal.h"
     35
    3536#ifndef PCUT_NO_LONG_JUMP
     37#pragma warning(push, 0)
    3638#include <setjmp.h>
     39#pragma warning(pop)
    3740#endif
    3841
     
    7376static int default_suite_initialized = 0;
    7477
    75 static void init_default_suite_when_needed()
    76 {
     78static void init_default_suite_when_needed() {
    7779        if (default_suite_initialized) {
    7880                return;
     
    9294 * @return Always a valid test suite item.
    9395 */
    94 static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it)
    95 {
     96static pcut_item_t *pcut_find_parent_suite(pcut_item_t *it) {
    9697        while (it != NULL) {
    9798                if (it->kind == PCUT_KIND_TESTSUITE) {
     
    108109 * @param func Function to run (can be NULL).
    109110 */
    110 static void run_setup_teardown(pcut_setup_func_t func)
    111 {
     111static void run_setup_teardown(pcut_setup_func_t func) {
    112112        if (func != NULL) {
    113113                func();
     
    122122 * @param outcome Outcome of the current test.
    123123 */
    124 static void leave_test(int outcome)
    125 {
     124static void leave_test(int outcome) {
    126125        PCUT_DEBUG("leave_test(outcome=%d), will_exit=%s", outcome,
    127             leave_means_exit ? "yes" : "no");
     126                leave_means_exit ? "yes" : "no");
    128127        if (leave_means_exit) {
    129128                exit(outcome);
     
    142141 * @param message Message describing the failure.
    143142 */
    144 void pcut_failed_assertion(const char *message)
    145 {
     143void pcut_failed_assertion(const char *message) {
    146144        static const char *prev_message = NULL;
    147145        /*
     
    162160                if (report_test_result) {
    163161                        pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
    164                             message, NULL, NULL);
     162                                message, NULL, NULL);
    165163                }
    166164        } else {
    167165                if (report_test_result) {
    168166                        pcut_report_test_done(current_test, PCUT_OUTCOME_FAIL,
    169                             prev_message, message, NULL);
     167                                prev_message, message, NULL);
    170168                }
    171169        }
     
    181179 * @return Error status (zero means success).
    182180 */
    183 static int run_test(pcut_item_t *test)
    184 {
     181static int run_test(pcut_item_t *test) {
    185182        /*
    186183         * Set here as the returning point in case of test failure.
     
    234231        if (report_test_result) {
    235232                pcut_report_test_done(current_test, PCUT_OUTCOME_PASS,
    236                     NULL, NULL, NULL);
     233                        NULL, NULL, NULL);
    237234        }
    238235
     
    248245 * @return Error status (zero means success).
    249246 */
    250 int pcut_run_test_forked(pcut_item_t *test)
    251 {
     247int pcut_run_test_forked(pcut_item_t *test) {
    252248        int rc;
    253249
     
    272268 * @return Error status (zero means success).
    273269 */
    274 int pcut_run_test_single(pcut_item_t *test)
    275 {
     270int pcut_run_test_single(pcut_item_t *test) {
    276271        int rc;
    277272
     
    293288 * @return Timeout in seconds.
    294289 */
    295 int pcut_get_test_timeout(pcut_item_t *test)
    296 {
     290int pcut_get_test_timeout(pcut_item_t *test) {
    297291        int timeout = PCUT_DEFAULT_TEST_TIMEOUT;
    298292        pcut_extra_t *extras = test->extras;
  • uspace/lib/pcut/tests/abort.c

    r275530a4 r4b54bd9  
    3030#include <stdlib.h>
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    34 PCUT_TEST(access_null_pointer)
    35 {
     34PCUT_TEST(access_null_pointer) {
    3635        abort();
    3736}
    3837
    39 PCUT_MAIN();
     38PCUT_MAIN()
  • uspace/lib/pcut/tests/asserts.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    34 PCUT_TEST(int_equals)
    35 {
     34PCUT_TEST(int_equals) {
    3635        PCUT_ASSERT_INT_EQUALS(1, 1);
    3736        PCUT_ASSERT_INT_EQUALS(1, 0);
    3837}
    3938
    40 PCUT_TEST(double_equals)
    41 {
     39PCUT_TEST(double_equals) {
    4240        PCUT_ASSERT_DOUBLE_EQUALS(1., 1., 0.001);
    4341        PCUT_ASSERT_DOUBLE_EQUALS(1., 0.5, 0.4);
    4442}
    4543
    46 PCUT_TEST(str_equals)
    47 {
     44PCUT_TEST(str_equals) {
    4845        PCUT_ASSERT_STR_EQUALS("xyz", "xyz");
    4946        PCUT_ASSERT_STR_EQUALS("abc", "xyz");
    5047}
    5148
    52 PCUT_TEST(str_equals_or_null_base)
    53 {
     49PCUT_TEST(str_equals_or_null_base) {
    5450        PCUT_ASSERT_STR_EQUALS_OR_NULL("xyz", "xyz");
    5551}
    5652
    57 PCUT_TEST(str_equals_or_null_different)
    58 {
     53PCUT_TEST(str_equals_or_null_different) {
    5954        PCUT_ASSERT_STR_EQUALS_OR_NULL("abc", "xyz");
    6055}
    6156
    62 PCUT_TEST(str_equals_or_null_one_null)
    63 {
     57PCUT_TEST(str_equals_or_null_one_null) {
    6458        PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, "xyz");
    6559}
    6660
    67 PCUT_TEST(str_equals_or_null_both)
    68 {
     61PCUT_TEST(str_equals_or_null_both) {
    6962        PCUT_ASSERT_STR_EQUALS_OR_NULL(NULL, NULL);
    7063}
    7164
    72 PCUT_TEST(assert_true)
    73 {
     65PCUT_TEST(assert_true) {
    7466        PCUT_ASSERT_TRUE(42);
    7567        PCUT_ASSERT_TRUE(0);
    7668}
    7769
    78 PCUT_TEST(assert_false)
    79 {
     70PCUT_TEST(assert_false) {
    8071        PCUT_ASSERT_FALSE(0);
    8172        PCUT_ASSERT_FALSE(42);
    8273}
    8374
    84 PCUT_MAIN();
     75PCUT_MAIN()
  • uspace/lib/pcut/tests/beforeafter.c

    r275530a4 r4b54bd9  
    3434#include <stdio.h>
    3535
    36 /*
    37  * Use sprintf_s in Windows but only with Microsoft compiler.
    38  * Namely, let MinGW use snprintf.
    39  */
    40 #if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
    41 #define snprintf sprintf_s
    42 #endif
    43 
    44 PCUT_INIT;
     36PCUT_INIT
    4537
    4638static char *buffer = NULL;
     
    4941PCUT_TEST_SUITE(suite_with_setup_and_teardown);
    5042
    51 PCUT_TEST_BEFORE
    52 {
     43PCUT_TEST_BEFORE {
    5344        buffer = malloc(BUFFER_SIZE);
    5445        PCUT_ASSERT_NOT_NULL(buffer);
    5546}
    5647
    57 PCUT_TEST_AFTER
    58 {
     48PCUT_TEST_AFTER {
    5949        free(buffer);
    6050        buffer = NULL;
    6151}
    6252
    63 PCUT_TEST(test_with_setup_and_teardown)
    64 {
     53PCUT_TEST(test_with_setup_and_teardown) {
     54#if (defined(__WIN64) || defined(__WIN32) || defined(_WIN32)) && defined(_MSC_VER)
     55        _snprintf_s(buffer, BUFFER_SIZE - 1, _TRUNCATE, "%d-%s", 56, "abcd");
     56#else
    6557        snprintf(buffer, BUFFER_SIZE - 1, "%d-%s", 56, "abcd");
     58#endif
     59
    6660        PCUT_ASSERT_STR_EQUALS("56-abcd", buffer);
    6761}
     
    6963PCUT_TEST_SUITE(another_without_setup);
    7064
    71 PCUT_TEST(test_without_any_setup_or_teardown)
    72 {
     65PCUT_TEST(test_without_any_setup_or_teardown) {
    7366        PCUT_ASSERT_NULL(buffer);
    7467}
    7568
    7669
    77 PCUT_MAIN();
     70PCUT_MAIN()
  • uspace/lib/pcut/tests/errno.c

    r275530a4 r4b54bd9  
    3535#endif
    3636
    37 PCUT_INIT;
     37PCUT_INIT
    3838
    39 PCUT_TEST(errno_value)
    40 {
    41         errno_t value = EOK;
     39PCUT_TEST(errno_value) {
     40        int value = EOK;
    4241        PCUT_ASSERT_ERRNO_VAL(EOK, value);
    4342        value = ENOENT;
     
    4847}
    4948
    50 PCUT_TEST(errno_variable)
    51 {
     49PCUT_TEST(errno_variable) {
    5250        errno = ENOENT;
    5351        PCUT_ASSERT_ERRNO(ENOENT);
     
    5755}
    5856
    59 PCUT_MAIN();
     57PCUT_MAIN()
  • uspace/lib/pcut/tests/inithook.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434static int init_counter = 0;
    3535
    36 static void init_hook(void)
    37 {
     36static void init_hook(void) {
    3837        init_counter++;
    3938}
    4039
    41 PCUT_TEST_BEFORE
    42 {
     40PCUT_TEST_BEFORE {
    4341        PCUT_ASSERT_INT_EQUALS(1, init_counter);
    4442        init_counter++;
    4543}
    4644
    47 PCUT_TEST(check_init_counter)
    48 {
     45PCUT_TEST(check_init_counter) {
    4946        PCUT_ASSERT_INT_EQUALS(2, init_counter);
    5047}
    5148
    52 PCUT_TEST(check_init_counter_2)
    53 {
     49PCUT_TEST(check_init_counter_2) {
    5450        PCUT_ASSERT_INT_EQUALS(2, init_counter);
    5551}
    5652
    5753
    58 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook));
     54PCUT_CUSTOM_MAIN(
     55        PCUT_MAIN_SET_INIT_HOOK(init_hook)
     56)
    5957
  • uspace/lib/pcut/tests/manytests.c

    r275530a4 r4b54bd9  
    3434 */
    3535
    36 PCUT_INIT;
     36PCUT_INIT
    3737
    38 PCUT_TEST(my_test_001)
    39 {
    40 }
    41 PCUT_TEST(my_test_002)
    42 {
    43 }
    44 PCUT_TEST(my_test_003)
    45 {
    46 }
    47 PCUT_TEST(my_test_004)
    48 {
    49 }
    50 PCUT_TEST(my_test_005)
    51 {
    52 }
    53 PCUT_TEST(my_test_006)
    54 {
    55 }
    56 PCUT_TEST(my_test_007)
    57 {
    58 }
    59 PCUT_TEST(my_test_008)
    60 {
    61 }
    62 PCUT_TEST(my_test_009)
    63 {
    64 }
    65 PCUT_TEST(my_test_010)
    66 {
    67 }
    68 PCUT_TEST(my_test_011)
    69 {
    70 }
    71 PCUT_TEST(my_test_012)
    72 {
    73 }
    74 PCUT_TEST(my_test_013)
    75 {
    76 }
    77 PCUT_TEST(my_test_014)
    78 {
    79 }
    80 PCUT_TEST(my_test_015)
    81 {
    82 }
    83 PCUT_TEST(my_test_016)
    84 {
    85 }
    86 PCUT_TEST(my_test_017)
    87 {
    88 }
    89 PCUT_TEST(my_test_018)
    90 {
    91 }
    92 PCUT_TEST(my_test_019)
    93 {
    94 }
    95 PCUT_TEST(my_test_020)
    96 {
    97 }
    98 PCUT_TEST(my_test_021)
    99 {
    100 }
    101 PCUT_TEST(my_test_022)
    102 {
    103 }
    104 PCUT_TEST(my_test_023)
    105 {
    106 }
    107 PCUT_TEST(my_test_024)
    108 {
    109 }
    110 PCUT_TEST(my_test_025)
    111 {
    112 }
    113 PCUT_TEST(my_test_026)
    114 {
    115 }
    116 PCUT_TEST(my_test_027)
    117 {
    118 }
    119 PCUT_TEST(my_test_028)
    120 {
    121 }
    122 PCUT_TEST(my_test_029)
    123 {
    124 }
    125 PCUT_TEST(my_test_030)
    126 {
    127 }
    128 PCUT_TEST(my_test_031)
    129 {
    130 }
    131 PCUT_TEST(my_test_032)
    132 {
    133 }
    134 PCUT_TEST(my_test_033)
    135 {
    136 }
    137 PCUT_TEST(my_test_034)
    138 {
    139 }
    140 PCUT_TEST(my_test_035)
    141 {
    142 }
    143 PCUT_TEST(my_test_036)
    144 {
    145 }
    146 PCUT_TEST(my_test_037)
    147 {
    148 }
    149 PCUT_TEST(my_test_038)
    150 {
    151 }
    152 PCUT_TEST(my_test_039)
    153 {
    154 }
    155 PCUT_TEST(my_test_040)
    156 {
    157 }
    158 PCUT_TEST(my_test_041)
    159 {
    160 }
    161 PCUT_TEST(my_test_042)
    162 {
    163 }
    164 PCUT_TEST(my_test_043)
    165 {
    166 }
    167 PCUT_TEST(my_test_044)
    168 {
    169 }
    170 PCUT_TEST(my_test_045)
    171 {
    172 }
    173 PCUT_TEST(my_test_046)
    174 {
    175 }
    176 PCUT_TEST(my_test_047)
    177 {
    178 }
    179 PCUT_TEST(my_test_048)
    180 {
    181 }
    182 PCUT_TEST(my_test_049)
    183 {
    184 }
    185 PCUT_TEST(my_test_050)
    186 {
    187 }
    188 PCUT_TEST(my_test_051)
    189 {
    190 }
    191 PCUT_TEST(my_test_052)
    192 {
    193 }
    194 PCUT_TEST(my_test_053)
    195 {
    196 }
    197 PCUT_TEST(my_test_054)
    198 {
    199 }
    200 PCUT_TEST(my_test_055)
    201 {
    202 }
    203 PCUT_TEST(my_test_056)
    204 {
    205 }
    206 PCUT_TEST(my_test_057)
    207 {
    208 }
    209 PCUT_TEST(my_test_058)
    210 {
    211 }
    212 PCUT_TEST(my_test_059)
    213 {
    214 }
    215 PCUT_TEST(my_test_060)
    216 {
    217 }
    218 PCUT_TEST(my_test_061)
    219 {
    220 }
    221 PCUT_TEST(my_test_062)
    222 {
    223 }
    224 PCUT_TEST(my_test_063)
    225 {
    226 }
    227 PCUT_TEST(my_test_064)
    228 {
    229 }
    230 PCUT_TEST(my_test_065)
    231 {
    232 }
    233 PCUT_TEST(my_test_066)
    234 {
    235 }
    236 PCUT_TEST(my_test_067)
    237 {
    238 }
    239 PCUT_TEST(my_test_068)
    240 {
    241 }
    242 PCUT_TEST(my_test_069)
    243 {
    244 }
    245 PCUT_TEST(my_test_070)
    246 {
    247 }
    248 PCUT_TEST(my_test_071)
    249 {
    250 }
    251 PCUT_TEST(my_test_072)
    252 {
    253 }
    254 PCUT_TEST(my_test_073)
    255 {
    256 }
    257 PCUT_TEST(my_test_074)
    258 {
    259 }
    260 PCUT_TEST(my_test_075)
    261 {
    262 }
    263 PCUT_TEST(my_test_076)
    264 {
    265 }
    266 PCUT_TEST(my_test_077)
    267 {
    268 }
    269 PCUT_TEST(my_test_078)
    270 {
    271 }
    272 PCUT_TEST(my_test_079)
    273 {
    274 }
    275 PCUT_TEST(my_test_080)
    276 {
    277 }
     38PCUT_TEST(my_test_001) { }
     39PCUT_TEST(my_test_002) { }
     40PCUT_TEST(my_test_003) { }
     41PCUT_TEST(my_test_004) { }
     42PCUT_TEST(my_test_005) { }
     43PCUT_TEST(my_test_006) { }
     44PCUT_TEST(my_test_007) { }
     45PCUT_TEST(my_test_008) { }
     46PCUT_TEST(my_test_009) { }
     47PCUT_TEST(my_test_010) { }
     48PCUT_TEST(my_test_011) { }
     49PCUT_TEST(my_test_012) { }
     50PCUT_TEST(my_test_013) { }
     51PCUT_TEST(my_test_014) { }
     52PCUT_TEST(my_test_015) { }
     53PCUT_TEST(my_test_016) { }
     54PCUT_TEST(my_test_017) { }
     55PCUT_TEST(my_test_018) { }
     56PCUT_TEST(my_test_019) { }
     57PCUT_TEST(my_test_020) { }
     58PCUT_TEST(my_test_021) { }
     59PCUT_TEST(my_test_022) { }
     60PCUT_TEST(my_test_023) { }
     61PCUT_TEST(my_test_024) { }
     62PCUT_TEST(my_test_025) { }
     63PCUT_TEST(my_test_026) { }
     64PCUT_TEST(my_test_027) { }
     65PCUT_TEST(my_test_028) { }
     66PCUT_TEST(my_test_029) { }
     67PCUT_TEST(my_test_030) { }
     68PCUT_TEST(my_test_031) { }
     69PCUT_TEST(my_test_032) { }
     70PCUT_TEST(my_test_033) { }
     71PCUT_TEST(my_test_034) { }
     72PCUT_TEST(my_test_035) { }
     73PCUT_TEST(my_test_036) { }
     74PCUT_TEST(my_test_037) { }
     75PCUT_TEST(my_test_038) { }
     76PCUT_TEST(my_test_039) { }
     77PCUT_TEST(my_test_040) { }
     78PCUT_TEST(my_test_041) { }
     79PCUT_TEST(my_test_042) { }
     80PCUT_TEST(my_test_043) { }
     81PCUT_TEST(my_test_044) { }
     82PCUT_TEST(my_test_045) { }
     83PCUT_TEST(my_test_046) { }
     84PCUT_TEST(my_test_047) { }
     85PCUT_TEST(my_test_048) { }
     86PCUT_TEST(my_test_049) { }
     87PCUT_TEST(my_test_050) { }
     88PCUT_TEST(my_test_051) { }
     89PCUT_TEST(my_test_052) { }
     90PCUT_TEST(my_test_053) { }
     91PCUT_TEST(my_test_054) { }
     92PCUT_TEST(my_test_055) { }
     93PCUT_TEST(my_test_056) { }
     94PCUT_TEST(my_test_057) { }
     95PCUT_TEST(my_test_058) { }
     96PCUT_TEST(my_test_059) { }
     97PCUT_TEST(my_test_060) { }
     98PCUT_TEST(my_test_061) { }
     99PCUT_TEST(my_test_062) { }
     100PCUT_TEST(my_test_063) { }
     101PCUT_TEST(my_test_064) { }
     102PCUT_TEST(my_test_065) { }
     103PCUT_TEST(my_test_066) { }
     104PCUT_TEST(my_test_067) { }
     105PCUT_TEST(my_test_068) { }
     106PCUT_TEST(my_test_069) { }
     107PCUT_TEST(my_test_070) { }
     108PCUT_TEST(my_test_071) { }
     109PCUT_TEST(my_test_072) { }
     110PCUT_TEST(my_test_073) { }
     111PCUT_TEST(my_test_074) { }
     112PCUT_TEST(my_test_075) { }
     113PCUT_TEST(my_test_076) { }
     114PCUT_TEST(my_test_077) { }
     115PCUT_TEST(my_test_078) { }
     116PCUT_TEST(my_test_079) { }
     117PCUT_TEST(my_test_080) { }
    278118
    279119
    280 PCUT_MAIN();
     120PCUT_MAIN()
  • uspace/lib/pcut/tests/preinithook.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434static int init_counter = 1;
    3535
    36 static void init_hook(void)
    37 {
     36static void init_hook(void) {
    3837        init_counter++;
    3938}
    4039
    41 static void pre_init_hook(int *argc, char **argv[])
    42 {
     40static void pre_init_hook(int *argc, char **argv[]) {
    4341        (void) argc;
    4442        (void) argv;
     
    4644}
    4745
    48 PCUT_TEST_BEFORE
    49 {
     46PCUT_TEST_BEFORE {
    5047        PCUT_ASSERT_INT_EQUALS(4, init_counter);
    5148        init_counter++;
    5249}
    5350
    54 PCUT_TEST(check_init_counter)
    55 {
     51PCUT_TEST(check_init_counter) {
    5652        PCUT_ASSERT_INT_EQUALS(5, init_counter);
    5753}
    5854
    59 PCUT_TEST(check_init_counter_2)
    60 {
     55PCUT_TEST(check_init_counter_2) {
    6156        PCUT_ASSERT_INT_EQUALS(5, init_counter);
    6257}
    6358
    6459
    65 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_INIT_HOOK(init_hook),
    66     PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
     60PCUT_CUSTOM_MAIN(
     61        PCUT_MAIN_SET_INIT_HOOK(init_hook),
     62        PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
     63)
    6764
  • uspace/lib/pcut/tests/printing.c

    r275530a4 r4b54bd9  
    3131#include <stdio.h>
    3232
    33 PCUT_INIT;
     33PCUT_INIT
    3434
    35 PCUT_TEST(print_to_stdout)
    36 {
     35PCUT_TEST(print_to_stdout) {
    3736        printf("Printed from a test to stdout!\n");
    3837}
    3938
    40 PCUT_TEST(print_to_stderr)
    41 {
     39PCUT_TEST(print_to_stderr) {
    4240        fprintf(stderr, "Printed from a test to stderr!\n");
    4341}
    4442
    45 PCUT_TEST(print_to_stdout_and_fail)
    46 {
     43PCUT_TEST(print_to_stdout_and_fail) {
    4744        printf("Printed from a test to stdout!\n");
    4845        PCUT_ASSERT_NOT_NULL(0);
    4946}
    5047
    51 PCUT_MAIN();
     48PCUT_MAIN()
  • uspace/lib/pcut/tests/simple.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    34 PCUT_TEST(zero_exponent)
    35 {
     34PCUT_TEST(zero_exponent) {
    3635        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3736}
    3837
    39 PCUT_TEST(one_exponent)
    40 {
     38PCUT_TEST(one_exponent) {
    4139        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4240        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
    4341}
    4442
    45 PCUT_TEST(same_strings)
    46 {
     43PCUT_TEST(same_strings) {
    4744        const char *p = "xyz";
    4845        PCUT_ASSERT_STR_EQUALS("xyz", p);
     
    5047}
    5148
    52 PCUT_MAIN();
     49PCUT_MAIN()
  • uspace/lib/pcut/tests/skip.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    34 PCUT_TEST(normal_test)
    35 {
     34PCUT_TEST(normal_test) {
    3635        PCUT_ASSERT_INT_EQUALS(1, 1);
    3736}
    3837
    39 PCUT_TEST(skipped, PCUT_TEST_SKIP)
    40 {
     38PCUT_TEST(skipped, PCUT_TEST_SKIP) {
    4139        PCUT_ASSERT_STR_EQUALS("skip", "not skipped");
    4240}
    4341
    44 PCUT_TEST(again_normal_test)
    45 {
     42PCUT_TEST(again_normal_test) {
    4643        PCUT_ASSERT_INT_EQUALS(1, 1);
    4744}
    4845
    49 PCUT_MAIN();
     46PCUT_MAIN()
  • uspace/lib/pcut/tests/suite1.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434PCUT_TEST_SUITE(intpow);
    3535
    36 PCUT_TEST(zero_exponent)
    37 {
     36PCUT_TEST(zero_exponent) {
    3837        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3938}
    4039
    41 PCUT_TEST(one_exponent)
    42 {
     40PCUT_TEST(one_exponent) {
    4341        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4442        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
  • uspace/lib/pcut/tests/suite2.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434PCUT_TEST_SUITE(intmin);
    3535
    36 PCUT_TEST(test_min)
    37 {
     36PCUT_TEST(test_min) {
    3837        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
    3938        PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
     
    4241}
    4342
    44 PCUT_TEST(test_same_numbers)
    45 {
     43PCUT_TEST(test_same_numbers) {
    4644        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 5));
    4745        PCUT_ASSERT_INT_EQUALS(719, intmin(719, 719));
  • uspace/lib/pcut/tests/suite_all.c

    r275530a4 r4b54bd9  
    2929#include <pcut/pcut.h>
    3030
    31 PCUT_INIT;
     31PCUT_INIT
    3232
    3333PCUT_IMPORT(intpow_suite);
    3434PCUT_IMPORT(intmin_suite);
    3535
    36 PCUT_MAIN();
     36PCUT_MAIN()
  • uspace/lib/pcut/tests/suites.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434PCUT_TEST_SUITE(intpow);
    3535
    36 PCUT_TEST(zero_exponent)
    37 {
     36PCUT_TEST(zero_exponent) {
    3837        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    3938}
    4039
    41 PCUT_TEST(one_exponent)
    42 {
     40PCUT_TEST(one_exponent) {
    4341        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4442        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
     
    4745PCUT_TEST_SUITE(intmin);
    4846
    49 PCUT_TEST(test_min)
    50 {
     47PCUT_TEST(test_min) {
    5148        PCUT_ASSERT_INT_EQUALS(5, intmin(5, 654));
    5249        PCUT_ASSERT_INT_EQUALS(5, intmin(654, 5));
     
    5552}
    5653
    57 PCUT_MAIN();
     54PCUT_MAIN()
  • uspace/lib/pcut/tests/teardown.c

    r275530a4 r4b54bd9  
    3131#include "tested.h"
    3232
    33 PCUT_INIT;
     33PCUT_INIT
    3434
    3535
     
    3737PCUT_TEST_SUITE(with_teardown);
    3838
    39 PCUT_TEST_AFTER
    40 {
     39PCUT_TEST_AFTER {
    4140        printf("This is teardown-function.\n");
    4241}
    4342
    44 PCUT_TEST(empty)
    45 {
     43PCUT_TEST(empty) {
    4644}
    4745
    48 PCUT_TEST(failing)
    49 {
     46PCUT_TEST(failing) {
    5047        PCUT_ASSERT_INT_EQUALS(10, intmin(1, 2));
    5148}
     
    5552PCUT_TEST_SUITE(with_failing_teardown);
    5653
    57 PCUT_TEST_AFTER
    58 {
     54PCUT_TEST_AFTER {
    5955        printf("This is failing teardown-function.\n");
    6056        PCUT_ASSERT_INT_EQUALS(42, intmin(10, 20));
    6157}
    6258
    63 PCUT_TEST(empty2)
    64 {
     59PCUT_TEST(empty2) {
    6560}
    6661
    67 PCUT_TEST(printing2)
    68 {
     62PCUT_TEST(printing2) {
    6963        printf("Printed before test failure.\n");
    7064        PCUT_ASSERT_INT_EQUALS(0, intmin(-17, -19));
    7165}
    7266
    73 PCUT_TEST(failing2)
    74 {
     67PCUT_TEST(failing2) {
    7568        PCUT_ASSERT_INT_EQUALS(12, intmin(3, 5));
    7669}
    7770
    7871
    79 PCUT_MAIN();
     72PCUT_MAIN()
  • uspace/lib/pcut/tests/teardownaborts.c

    r275530a4 r4b54bd9  
    3131#include <stdlib.h>
    3232
    33 PCUT_INIT;
     33PCUT_INIT
    3434
    35 PCUT_TEST_AFTER
    36 {
     35PCUT_TEST_AFTER {
    3736        abort();
    3837}
    3938
    40 PCUT_TEST(print_and_fail)
    41 {
     39PCUT_TEST(print_and_fail) {
    4240        printf("Tear-down will cause null pointer access...\n");
    4341        PCUT_ASSERT_NOT_NULL(NULL);
    4442}
    4543
    46 PCUT_MAIN();
     44PCUT_MAIN()
  • uspace/lib/pcut/tests/tested.c

    r275530a4 r4b54bd9  
    3131#define UNUSED(a) ((void)a)
    3232
    33 long intpow(int base, int exp)
    34 {
    35         UNUSED(base);
    36         UNUSED(exp);
     33long intpow(int base, int exp) {
     34        UNUSED(base); UNUSED(exp);
    3735        return 0;
    3836}
    3937
    40 int intmin(int a, int b)
    41 {
     38int intmin(int a, int b) {
    4239        UNUSED(b);
    4340        return a;
  • uspace/lib/pcut/tests/testlist.c

    r275530a4 r4b54bd9  
    3030#include "tested.h"
    3131
    32 PCUT_INIT;
     32PCUT_INIT
    3333
    3434static char *argv_patched[] = {
     
    3838};
    3939
    40 static void pre_init_hook(int *argc, char **argv[])
    41 {
     40static void pre_init_hook(int *argc, char **argv[]) {
    4241        argv_patched[0] = (*argv)[0];
    4342        *argc = 2;
     
    4544}
    4645
    47 PCUT_TEST(unreachable)
    48 {
     46PCUT_TEST(unreachable) {
    4947        PCUT_ASSERT_TRUE(0 && "unreachable code");
    5048}
    5149
    5250
    53 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook));
     51PCUT_CUSTOM_MAIN(
     52        PCUT_MAIN_SET_PREINIT_HOOK(pre_init_hook)
     53)
    5454
  • uspace/lib/pcut/tests/timeout.c

    r275530a4 r4b54bd9  
    11/*
    2  * Copyright (c) 2012-2013 Vojtech Horky
     2 * Copyright (c) 2012-2018 Vojtech Horky
    33 * All rights reserved.
    44 *
     
    3232#include <fibril.h>
    3333#else
    34 #ifdef __unix
     34#if defined(__unix) || defined(__APPLE__)
    3535#include <unistd.h>
    3636#endif
     
    4343#include "tested.h"
    4444
    45 static void my_sleep(int sec)
    46 {
     45static void my_sleep(int sec) {
    4746#ifdef __helenos__
    4847        fibril_sleep(sec);
    4948#else
    50 #ifdef __unix
     49#if defined(__unix) || defined(__APPLE__)
    5150        sleep(sec);
    5251#endif
     
    5756}
    5857
    59 PCUT_INIT;
     58PCUT_INIT
    6059
    61 PCUT_TEST(shall_time_out)
    62 {
     60PCUT_TEST(shall_time_out) {
    6361        printf("Text before sleeping.\n");
    6462        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 5);
     
    6765
    6866PCUT_TEST(custom_time_out,
    69     PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3))
    70 {
     67                PCUT_TEST_SET_TIMEOUT(PCUT_DEFAULT_TEST_TIMEOUT * 3)) {
    7168        printf("Text before sleeping.\n");
    7269        my_sleep(PCUT_DEFAULT_TEST_TIMEOUT * 2);
     
    7471}
    7572
    76 PCUT_MAIN();
     73PCUT_MAIN()
  • uspace/lib/pcut/tests/xmlreport.c

    r275530a4 r4b54bd9  
    3333#include "tested.h"
    3434
    35 PCUT_INIT;
     35PCUT_INIT
    3636
    37 PCUT_TEST(zero_exponent)
    38 {
     37PCUT_TEST(zero_exponent) {
    3938        PCUT_ASSERT_INT_EQUALS(1, intpow(2, 0));
    4039}
    4140
    42 PCUT_TEST(one_exponent)
    43 {
     41PCUT_TEST(one_exponent) {
    4442        PCUT_ASSERT_INT_EQUALS(2, intpow(2, 1));
    4543        PCUT_ASSERT_INT_EQUALS(39, intpow(39, 1));
    4644}
    4745
    48 PCUT_TEST(same_strings)
    49 {
     46PCUT_TEST(same_strings) {
    5047        const char *p = "xyz";
    5148        PCUT_ASSERT_STR_EQUALS("xyz", p);
     
    5350}
    5451
    55 PCUT_CUSTOM_MAIN(PCUT_MAIN_SET_XML_REPORT);
     52PCUT_CUSTOM_MAIN(
     53        PCUT_MAIN_SET_XML_REPORT
     54)
  • uspace/lib/pcut/update-from-master.sh

    r275530a4 r4b54bd9  
    4343fi
    4444
    45 $RUN find -not -name update-from-master.sh -delete
     45$RUN find -not -name update-from-master.sh -and -not -name doc -and -not -name 'doxygroups.h' -delete
    4646$RUN wget -q https://github.com/vhotspur/pcut/archive/master.zip -O pcut-master.zip
    4747$RUN unzip -q -u pcut-master.zip
    48 $RUN mv -f pcut-master/* .
     48$RUN mv -f pcut-master/src .
     49$RUN mv -f pcut-master/include .
     50$RUN mv -f pcut-master/tests .
     51$RUN mv -f pcut-master/helenos*.mak .
    4952$RUN rm -rf pcut-master pcut-master.zip
    50 $RUN rm -rf contrib doc
    5153$RUN rm -f CMakeLists.txt *.cmake run_test.sh
    5254
Note: See TracChangeset for help on using the changeset viewer.