summaryrefslogtreecommitdiffstats
path: root/tools/check_loading
blob: 0d082edc085adc88efce776767f58b6d03ce2b08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#! /bin/bash
#
RESET="\033[0m"
RED="\033[0;31m"
GREEN="\033[0;32m"
#
abspath=$(readlink -f $0)
parentdir=${abspath%/*/*}
#
rm /tmp/ffi-efl-* 2>/dev/null
#
function run () {
    echo -n "    ${1##*/}"
    outf=/tmp/ffi-efl-${1##*/}
    $RUBY -I $parentdir/lib $1 2>>$outf && rm $outf && echo -e "$GREEN OK$RESET" || echo -e "$RED KO$RESET"
}
#
function each () {
    echo $($RUBY --version)
    echo "  lib/efl/native/*.rb"
    for native in $(find $parentdir/lib/efl/native/ -name 'e*.rb' | sort); do
        run $native
    done
    echo "  lib/efl/*.rb"
    for wrapper in $(find $parentdir/lib/efl/ -name 'e*.rb' | grep -v native | sort); do
        run $wrapper
    done
}
#
RUBY=/usr/bin/ruby
time each
echo
RUBY=/opt/ruby1.8/bin/ruby
time each
echo
#