aboutsummaryrefslogtreecommitdiffstats
path: root/tools/Makefile
Commit message (Expand)AuthorAgeFilesLines
* sparse: add as a new package selectable from the configJohn Crispin2014-04-121-0/+1
* flex: fix build error due to undefined library symbolsFelix Fietkau2014-03-121-1/+1
* tools: fix stampfile dependency handling when the list of build dirs changes ...Felix Fietkau2014-03-081-15/+18
* imx23: rename imx23 to mxs for upcoming imx23/28 supportZoltan HERPAI2013-10-141-1/+1
* [tools] patch: other tools might depend on this oneLuka Perkov2013-09-271-0/+4
* [tools] quilt: add findutils as dependencyLuka Perkov2013-09-271-1/+1
* [tools] sdcc: drop tool, it is not used since r31227Luka Perkov2013-09-241-4/+0
* tools: make padjffs2 depend on findutilsFelix Fietkau2013-07-291-0/+1
* tools: remove stale reference to the find PrepareCommand TargetFelix Fietkau2013-07-091-1/+1
* tools: add a package for findutils, Linux 3.10 need GNU xargsFelix Fietkau2013-07-091-1/+1
* [tools] add bc as required by kernels 3.9+Zoltan HERPAI2013-07-081-1/+1
* tools: add tools for i.MX23 boardsZoltan HERPAI2013-06-261-0/+1
* build: BSD compile fixesFelix Fietkau2013-03-071-3/+9
* [tools] mklibs: upgrade to 0.1.35Luka Perkov2013-02-261-0/+1
* tools: add a symlink for gnu awk to fix kernel build errors on some platformsFelix Fietkau2012-12-171-1/+2
* [tools] rename patch-cmdline and add code for patching DTB files into kernel ...John Crispin2012-11-021-1/+1
* mac80211: brcmsmac: use firmware extracted from proprietary driverHauke Mehrtens2012-10-081-1/+1
* tools: add b43-toolsHauke Mehrtens2012-10-081-0/+4
* tools: flex depends on m4Felix Fietkau2012-09-231-0/+1
* [tools] add mktools and dosfstools which are needed for the raspberry piJohn Crispin2012-07-241-0/+1
* tools: prefer gmd5sum if presentFelix Fietkau2012-07-171-1/+1
* tools: sdcc depends on bisonFelix Fietkau2012-06-291-0/+1
* tools: add a python symlink that prefers python2Felix Fietkau2012-06-101-1/+2
* tools: add scons (patch by Dave Taht)Felix Fietkau2012-05-051-1/+1
* tools: add xz dependency to automakeGabor Juhos2012-04-211-1/+1
* tools: add sdcc subdir to MakefileJo-Philipp Wich2012-04-091-0/+4
* tools: fix stat symlink if destination already existsFelix Fietkau2012-03-261-0/+1
* tools: fix GNU stat detection to prevent it from picking up other things name...Felix Fietkau2012-03-231-1/+10
* tools: add dependency on the seq symlinkFelix Fietkau2012-03-101-1/+1
* tools/mtd-utils: add XZ compression support to mkfs.ubifsGabor Juhos2012-03-021-1/+1
* tools: symlink seq to the host staging dir (gseq on mac os x)Felix Fietkau2012-02-291-0/+1
* tools: clean up Makefiles / make ccache workJohn Crispin2012-01-151-2/+6
* build: add a lib64 symlink in staging_dir/host and staging_dir/toolchain* for...Felix Fietkau2011-11-281-0/+1
* [tools]: add upx, but make it build only for ppc nowImre Kaloz2011-10-121-1/+2
* tools: always build mpc, now that older gcc versions have been eliminated, fi...Felix Fietkau2011-07-021-2/+1
* tools: create a new tool for more efficient jffs2 paddingGabor Juhos2011-07-021-1/+1
* add a portable version of sys/sysmacros.h and and let the kernel use the host...Felix Fietkau2011-07-021-1/+2
* move mkelfimage from tools/ to package/ as it needs a proper i386 toolchain -...Felix Fietkau2011-07-021-1/+1
* [tools]John Crispin2011-05-171-1/+1
* make the build system a bit more silent without V=99Felix Fietkau2011-04-041-1/+1
* tools/squashfs4: update to version 4.2 (adds support for xz compression)Felix Fietkau2011-04-031-1/+1
* [tools] package xfce-macros, required for autoreconf in xfce4 packagesJo-Philipp Wich2011-03-091-1/+2
* tools/mpc: add dependency on mpfrFelix Fietkau2011-02-011-1/+1
* add tools/cmakeFelix Fietkau2011-01-311-1/+1
* cleanup toolchain version handlingImre Kaloz2011-01-271-3/+3
* [tools] remove bogus qemu dependencyJo-Philipp Wich2011-01-171-1/+0
* tools: add some missing dependenciesHauke Mehrtens2011-01-011-3/+7
* [tools] package mm-common, this provides missing m4 macros for glibmm, gtkmm,...Jo-Philipp Wich2010-12-221-1/+2
* [tools] introduce missing-macros meta package, this will supply needed m4 mac...Jo-Philipp Wich2010-12-211-1/+2
* tools: fix dependenciesHauke Mehrtens2010-12-191-4/+2
p">, test.waT3, test.waT4}; /* * Console output. */ static BaseChannel *chp; void test_printn(uint32_t n) { char buf[16], *p; if (!n) chIOPut(chp, '0'); else { p = buf; while (n) *p++ = (n % 10) + '0', n /= 10; while (p > buf) chIOPut(chp, *--p); } } void test_print(char *msgp) { while (*msgp) chIOPut(chp, *msgp++); } void test_println(char *msgp) { test_print(msgp); chIOPut(chp, '\r'); chIOPut(chp, '\n'); } /* * Tokens. */ static void clear_tokens(void) { tokp = tokens_buffer; } static void print_tokens(void) { char *cp = tokens_buffer; while (cp < tokp) chIOPut(chp, *cp++); } void test_emit_token(char token) { chSysLock(); *tokp++ = token; chSysUnlock(); } /* * Assertions. */ bool_t _test_fail(unsigned point) { local_fail = TRUE; global_fail = TRUE; failpoint = point; return TRUE; } bool_t _test_assert(unsigned point, bool_t condition) { if (!condition) return _test_fail(point); return FALSE; } bool_t _test_assert_sequence(unsigned point, char *expected) { char *cp = tokens_buffer; while (cp < tokp) { if (*cp++ != *expected++) return _test_fail(point); } if (*expected) return _test_fail(point); clear_tokens(); return FALSE; } bool_t _test_assert_time_window(unsigned point, systime_t start, systime_t end) { return _test_assert(point, chTimeIsWithin(start, end)); } /* * Threads utils. */ void test_terminate_threads(void) { int i; for (i = 0; i < MAX_THREADS; i++) if (threads[i]) chThdTerminate(threads[i]); } void test_wait_threads(void) { int i; for (i = 0; i < MAX_THREADS; i++) if (threads[i] != NULL) { chThdWait(threads[i]); threads[i] = NULL; } } #if CH_DBG_THREADS_PROFILING void test_cpu_pulse(unsigned duration) { systime_t start, end, now; start = chThdSelf()->p_time; end = start + MS2ST(duration); do { now = chThdSelf()->p_time; #if defined(WIN32) ChkIntSources(); #endif } while (end > start ? (now >= start) && (now < end) : (now >= start) || (now < end)); } #endif systime_t test_wait_tick(void) { chThdSleep(1); return chTimeNow(); } /* * Timer utils. */ static VirtualTimer vt; bool_t test_timer_done; static void tmr(void *p) { (void)p; test_timer_done = TRUE; } void test_start_timer(unsigned ms) { systime_t duration = MS2ST(ms); test_timer_done = FALSE; chSysLock(); chVTSetI(&vt, duration, tmr, NULL); chSysUnlock(); } /* * Test suite execution. */ static void execute_test(const struct testcase *tcp) { int i; /* Initialization */ clear_tokens(); local_fail = FALSE; for (i = 0; i < MAX_THREADS; i++) threads[i] = NULL; if (tcp->setup != NULL) tcp->setup(); tcp->execute(); if (tcp->teardown != NULL) tcp->teardown(); test_wait_threads(); } static void print_line(void) { unsigned i; for (i = 0; i < 76; i++) chIOPut(chp, '-'); chIOPut(chp, '\r'); chIOPut(chp, '\n'); } msg_t TestThread(void *p) { int i, j; chp = p; test_println(""); test_println("*** ChibiOS/RT test suite"); test_println("***"); test_print("*** Kernel: "); test_println(CH_KERNEL_VERSION); test_print("*** Architecture: "); test_println(CH_ARCHITECTURE_NAME); #ifdef __GNUC__ test_print("*** GCC Version: "); test_println(__VERSION__); #endif test_println(""); global_fail = FALSE; i = 0; while (patterns[i]) { j = 0; while (patterns[i][j]) { #if DELAY_BETWEEN_TESTS > 0 chThdSleepMilliseconds(DELAY_BETWEEN_TESTS); #endif print_line(); test_print("--- Test Case "); test_printn(i + 1); test_print("."); test_printn(j + 1); test_print(" ("); test_print(patterns[i][j]->gettest()); test_println(")"); execute_test(patterns[i][j]); if (local_fail) { test_print("--- Result: FAILURE (#"); test_printn(failpoint); test_print(" ["); print_tokens(); test_println("])"); } else test_println("--- Result: SUCCESS"); j++; } i++; } print_line(); test_println(""); test_print("Final result: "); if (global_fail) test_println("FAILURE"); else test_println("SUCCESS"); return (msg_t)global_fail; }