:::: MENU ::::
Posts tagged with: fedora 17

Run ownCloud Cucumber tests on Fedora 17

ownCloud uses automated testing to check for problems, and writing and executing these tests is important for any contributor. In my capacity as an ownCloud systems developer I use these tests to quickly verify that my apps don’t break after merging or pulling new code. For those less familiar with Ruby however, getting the Cucumber based behaviour tests running can be confusing. Here’s how to do it on Fedora.

  • Install the necessary dependencies:
    sudo yum install libxslt libxslt-devel libyaml libyaml-devel xorg-x11-server-Xvfb openssl-devel
  • Install RVM. If you have previously installed it, you may need to reinstall it so that the newly available libraries are used:
    sudo rvm install 1.9.3
  • Install the Selenium gem:
    sudo gem install selenium-webdriver
  • Clone the acceptance-testing repository from GitHub:
    git clone https://github.com/owncloud/acceptance-testing
  • Switch to root (su), and enter the newly created directory (this will trigger the .rvmrc shell script):
    cd acceptance-testing
  • Accept the warning and agree to run the script
  • If the script encounters errors (e.g. “RVM not found” or “RVM is not a function”), then open a new terminal, and repeat steps from “Switch to root”.
  • If you are testing a copy of ownCloud running locally on your machine, start your webserver, e.g.:
    service httpd start
  • Run cucumber to execute the tests:
    cucumber HOST=foo.bar.com features

Install Android Emulator in Fedora 17

Android emulator allows you to test apps and websites from an Android user’s perspective, without the need for a physical Android device. The Emulator does not work “out of the box” in Fedora however, and only a version for 32-bit machines is provided. Additional packages are required, and the GUI must be started from the command line. These steps are designed for 64-bit machines, but they should also work on 32-bit ones as well.
android emulator screenshot

  1. Install the additional packages which the emulator depends upon:
    yum install libstdc++.i686 glibc.i686 ncurses-libs.i686 libstdc libstdc++.i686 libzip.i686 libX11.i686 libXrandr.i686 SDL.i686
  2. Download the Linux edition of the emulator from Google: http://developer.android.com/sdk/index.html
  3. Extract the downloaded archive (open your Downloads folder right click on the file, “extract here”)
  4. Open a terminal, change directory to the folder you have just extracted:
    cd ~/Downloads/android-sdk-linux/
  5. Run the emulator:
    tools/android
  6. Once the repository has automatically updated itself, download the packages that have been automatically selected for you (click “install packages”)
  7. Open the Virtual Device manage window from the menu: “tools” > “Manage AVDs”
  8. Click “new” to create a new AVD, use default settings
  9. Highlight your new device and click “start”, then “launch”

The emulator should now boot up after a few seconds and allow you to use the device.


Install Webgen in Fedora 17 with Ruby 1.8.6 and RVM

Webgen does not work with new versions of Ruby. Using Webgen installed using ruby and rubygems from Fedora repos results in errors including “obsolete and deprecated Config”.

To get webgen to work, we will use RVM (Ruby Version Manager). This allows you install multiple versions of ruby side by side. RVM is not available in Fedora repositories, and must be manually installed.

  1. If you have already installed ruby from a repository, remove it:

    yum remove ruby ruby-libs rubygems

  2. As root, install RVM, and follow the on-screen instructions:

    curl -L https://get.rvm.io | bash -s stable --ruby
    Note: the leading backslash () is intentional and could be important

  3. Install Ruby 1.8.6:

    rvm install 1.8.6
    Note: you can see what versions are available to install using: rvm list known

  4. Switch to use Ruby 1.8.6 by default:

    rvm use 1.8.6
    Note: You can check that it worked using: ruby -v
    Note: If you want this to be permanent, for all shells, and not just the terminal you’re currently using, execute: rvm use 1.8.6 –default

  5. Install webgen:

    gem install webgen

  6. That’s it! Good luck.

Install Rar in Fedora 17: make rar archive files

Plenty of resources explain how to install unrar support in Fedora, but what about when you need to create rar files, instead of merely extracting them?

Rar has licensing issues which is why it isn’t available in standard Fedora repositories. The package ‘Unrar’ is available in rpmfusion repositories, but to get rar compression support you can install one of these two non-Free packages:

rar-3.8.0-1.el6.rf.i686.rpm (32 bit)
rar-3.8.0-1.el6.rf.x86_64.rpm (64 bit)