~ci-train-bot/qtubuntu-media/qtubuntu-media-ubuntu-zesty-2472

« back to all changes in this revision

Viewing changes to tests/integration/uris/generate_test_files.sh

  • Committer: CI Train Bot
  • Author(s): Jim Hodapp
  • Date: 2016-02-22 19:00:08 UTC
  • mfrom: (100.1.7 qtubuntu-media)
  • Revision ID: ci-train-bot@canonical.com-20160222190008-am4pm7lwh6fynnnw
URI encode the URI that we call setMedia() on or add to the playlist Fixes: #1449790
Approved by: Alfonso Sanchez-Beato

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
WORKING_DIR=/tmp/qtubuntu-media
 
4
BASE_FILE=$1/testdata/Ubuntu.ogg
 
5
 
 
6
mkdir $WORKING_DIR
 
7
 
 
8
echo "WORKING_DIR: $WORKING_DIR"
 
9
echo "BASE_FILE: $BASE_FILE"
 
10
 
 
11
# Creates several files with a single character filename that starts
 
12
# at ASCII char #32 and ends with #126
 
13
for i in {32..127}  # from 'Space' to '~'
 
14
do
 
15
    # skip '"', '%', '<', '>', '.', 'DEL'
 
16
    if [ $i -eq 127 ]
 
17
    then
 
18
        continue
 
19
    else
 
20
        chr=$(printf \\$(printf '%03o' $i))
 
21
 
 
22
        echo "Creating file $chr.ogg from $BASE_FILE" > "$WORKING_DIR/log.txt"
 
23
        cp $BASE_FILE "$WORKING_DIR/track$chr.ogg"
 
24
    fi
 
25
done