File: basic

package info (click to toggle)
mongodb 1:3.4.18-2
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 252,828 kB
  • sloc: cpp: 1,848,136; ansic: 565,667; python: 84,680; perl: 6,461; sh: 6,333; asm: 4,379; java: 4,342; makefile: 2,232; pascal: 617; ruby: 230; xml: 176; lisp: 19
file content (29 lines) | stat: -rw-r--r-- 492 bytes parent folder | download | duplicates (2)
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
#!/bin/bash

set -e

TIMEOUT=120

echo -n "Waiting for mongod to start: "
count=0

while ! echo 'db.version()' | mongo --quiet >/dev/null; do
    echo -n "."
    count=$((count+1))
    if test $count -gt $TIMEOUT; then
        echo "    mongod failed to start?"
        pgrep mongod
        exit 1
    fi
    sleep 1
done

for testfile in jstests/core/basic*.js; do
    echo
    echo " -> Running $testfile"
    mongo --verbose "$testfile" 2>&1
done

echo
echo "=================="
echo "OK"