Executing bash script in gradle

前端 未结 1 1810
野的像风
野的像风 2021-01-01 17:18

I am doing functional testing with geb.

My application is deployed using virgo and uses HSQLDB to store data. I would like to perform tests on this working version o

相关标签:
1条回答
  • 2021-01-01 17:55

    That's weird

    I created a task

    task callCL(type: Exec) {
        commandLine './cl.sh'
    }
    

    that calls cl.sh file

    #!/bin/sh
    echo "starting "
    ./acl.sh &
    sleep 10
    ./acl.sh &
    

    that call acl.sh

    #!/bin/sh
    echo "I am not doing anything"
    

    and it worked! but one thing though, when you add ./acl.sh ampersand character & you're calling the task from a different thread that started gradle, and kinda looks like it's hanging. I would remove the & from your calls to shutdown and start like this

    #!/bin/sh
    rm -rf $VIRGO_HOME/aresdb*
    $VIRGO_HOME/bin/shutdown.sh
    $VIRGO_HOME/bin/startup.sh
    

    anyways you want to wait in the same thread from shutdown to start, and no need to call sleep too!

    0 讨论(0)
提交回复
热议问题