Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brucecrevensten/1503210 to your computer and use it in GitHub Desktop.
Save brucecrevensten/1503210 to your computer and use it in GitHub Desktop.
getting phantomjs working on CentOS 6.0
<target name="jasmine" description="Run unit tests with Jasmine">
    <exec executable="${basedir}/tests/js/jasmine-reporters/test/phantomjs.runner.sh">
        <env key="DISPLAY" value=":0" />
        <arg line="${basedir}/tests/js/jasmine-reporters/test/JUnitRunner.html"/>
    </exec>
    <copy todir="${basedir}/build/test-results">
        <fileset dir="${basedir}/tests/js/jasmine-reporters/test">
            <include name="**/TEST*" />
        </fileset>
    </copy>
</target>
# (1) get python 2.7
# url is strange below, but is correct URL
# ref: http://villaroad.com/2010/10/rolling-python-2-6-2-on-centos-5-3/

# (2) get the right versions of qt (4.7)
wget http://dl.atrpms.net/el6-x86_64/atrpms/stable/atrpms-repo-6-4.el6.x86_64.rpm
sudo rpm -Uvh atrpms-repo-6-4.el6.x86_64.rpm
sudo yum --enablerepo=atrpms-testing install qt47-devel qt47-webkit qt47-webkit-devel \
qt47-devel sqlite qmake-qt47 xorg-x11-server-Xvfb xorg-x11-fonts*

# (3) test it out
Xvfb :2 -screen 0 800x600x24 2> /dev/null &
export DISPLAY=:2.0
phantomjs test.js
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment