Reduce some test cases, generate html test files

This commit is contained in:
Frank Denis 2015-12-07 08:58:35 +01:00
parent e262425a4a
commit 7ada62b1ff
3 changed files with 9 additions and 6 deletions

View File

@ -51,10 +51,13 @@ if [ "x$BROWSER_TESTS" != "x" ]; then
(
cd test/default && \
mkdir -p browser && \
rm -f browser/tests.txt && \
for file in *.js; do
fgrep -v "#! /usr/bin/env {NODE}" "$file" > "browser/${file}.tmp"
chmod -x "browser/${file}.tmp"
mv -f "browser/${file}.tmp" "browser/${file}"
fgrep -v "#! /usr/bin/env {NODE}" "$file" > "browser/${file}"
tname=$(echo "$file" | sed 's/.js$//')
cp -f "${tname}.exp" "browser/${tname}.exp"
sed "s/{{tname}}/${tname}/" index.html.tpl > "browser/${tname}.html"
echo "${tname}.html" >> "browser/tests.txt"
done
)
else

View File

@ -22,7 +22,7 @@ int main(void)
size_t c_size;
int ret;
m2_size = m_size = 1U + randombytes_uniform(10000);
m2_size = m_size = 1U + randombytes_uniform(1000);
c_size = crypto_box_MACBYTES + m_size;
m = (unsigned char *) sodium_malloc(m_size);
m2 = (unsigned char *) sodium_malloc(m2_size);

View File

@ -3,14 +3,14 @@
#include "cmptest.h"
static unsigned char key[32];
static unsigned char c[10000];
static unsigned char c[1000];
static unsigned char a[16];
int main(void)
{
int clen;
for (clen = 0; clen < 10000; ++clen) {
for (clen = 0; clen < 1000; ++clen) {
randombytes_buf(key, sizeof key);
randombytes_buf(c, clen);
crypto_onetimeauth(a, c, clen, key);