nongit.freedesktop.org/mesa/drm</title>
<meta name='generator' content='cgit v1.2.3'/>
<meta name='robots' content='index, nofollow'/>
<link rel='stylesheet' type='text/css' href='/cgit-css/cgit.css'/>
<link rel='shortcut icon' href='/favicon.ico'/>
<link rel='alternate' title='Atom feed' href='https://gitolite.ideasonboard.com/renesas/drm.git/atom/intel/tests/test-batch.sh?h=master' type='application/atom+xml'/>
<link rel='vcs-git' href='https://gitolite.ideasonboard.com/renesas/drm.git' title='renesas/drm.git Git repository'/>
</head>
<body>
<div id='cgit'><table id='header'>
<tr>
<td class='logo' rowspan='2'><a href='/'><img src='/logo.png' alt='cgit logo'/></a></td>
<td class='main'><a href='/'>index</a> : <a title='renesas/drm.git' href='/renesas/drm.git/'>renesas/drm.git</a></td><td class='form'><form method='get'>
<input type='hidden' name='id' value='6f950de953ead6391ffa82b6c517fd4ea3ce3e29'/><select name='h' onchange='this.form.submit();'>
<option value='android'>android</option>
<option value='live'>live</option>
<option value='master' selected='selected'>master</option>
</select> <input type='submit' value='switch'/></form></td></tr>
<tr><td class='sub'>libdrm, cloned from git://anongit.freedesktop.org/mesa/drm</td><td class='sub right'>Laurent Pinchart</td></tr></table>
<table class='tabs'><tr><td>
<a href='/renesas/drm.git/'>summary</a><a href='/renesas/drm.git/refs/?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>refs</a><a href='/renesas/drm.git/log/intel/tests/test-batch.sh'>log</a><a class='active' href='/renesas/drm.git/tree/intel/tests/test-batch.sh?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>tree</a><a href='/renesas/drm.git/commit/intel/tests/test-batch.sh?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>commit</a><a href='/renesas/drm.git/diff/intel/tests/test-batch.sh?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>diff</a></td><td class='form'><form class='right' method='get' action='/renesas/drm.git/log/intel/tests/test-batch.sh'>
<input type='hidden' name='id' value='6f950de953ead6391ffa82b6c517fd4ea3ce3e29'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/renesas/drm.git/tree/?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>root</a>/<a href='/renesas/drm.git/tree/intel?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>intel</a>/<a href='/renesas/drm.git/tree/intel/tests?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>tests</a>/<a href='/renesas/drm.git/tree/intel/tests/test-batch.sh?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>test-batch.sh</a></div><div class='content'>blob: a94057ffcd0dd2a060bd431118f2b786cdd58641 (<a href='/renesas/drm.git/plain/intel/tests/test-batch.sh?id=6f950de953ead6391ffa82b6c517fd4ea3ce3e29'>plain</a>)
<table summary='blob content' class='blob'>
<tr><td class='linenumbers'><pre><a id='n1' href='#n1'>1</a>
<a id='n2' href='#n2'>2</a>
<a id='n3' href='#n3'>3</a>
<a id='n4' href='#n4'>4</a>
<a id='n5' href='#n5'>5</a>
<a id='n6' href='#n6'>6</a>
<a id='n7' href='#n7'>7</a>
<a id='n8' href='#n8'>8</a>
<a id='n9' href='#n9'>9</a>
<a id='n10' href='#n10'>10</a>
<a id='n11' href='#n11'>11</a>
<a id='n12' href='#n12'>12</a>
<a id='n13' href='#n13'>13</a>
<a id='n14' href='#n14'>14</a>
<a id='n15' href='#n15'>15</a>
<a id='n16' href='#n16'>16</a>
<a id='n17' href='#n17'>17</a>
<a id='n18' href='#n18'>18</a>
<a id='n19' href='#n19'>19</a>
<a id='n20' href='#n20'>20</a>
</pre></td>
<td class='lines'><pre><code><span class="hl slc">#!/bin/sh</span>

TEST_FILENAME<span class="hl opt">=</span><span class="hl str">`echo &quot;</span><span class="hl ipl">$0</span><span class="hl str">&quot; | sed &apos;s|.sh||&apos;`</span>
.<span class="hl opt">/</span>test_decode <span class="hl kwd">$TEST_FILENAME</span>

ret<span class="hl opt">=</span>$?

<span class="hl slc"># pretty-print a diff showing what happened, and leave the dumped</span>
<span class="hl slc"># around for possibly moving over the ref.</span>
<span class="hl kwa">if</span> <span class="hl kwb">test</span> <span class="hl kwd">$ret</span> <span class="hl opt">=</span> <span class="hl num">1</span><span class="hl opt">;</span> <span class="hl kwa">then</span>
    REF_FILENAME<span class="hl opt">=</span><span class="hl str">&quot;</span><span class="hl ipl">$TEST_FILENAME</span><span class="hl str">-ref.txt&quot;</span>
    NEW_FILENAME<span class="hl opt">=</span><span class="hl str">&quot;</span><span class="hl ipl">$TEST_FILENAME</span><span class="hl str">-new.txt&quot;</span>
    .<span class="hl opt">/</span>test_decode <span class="hl kwd">$TEST_FILENAME</span> <span class="hl kwb">-dump</span> <span class="hl opt">&gt;</span> <span class="hl kwd">$NEW_FILENAME</span>
    <span class="hl kwa">if</span> <span class="hl kwb">test</span> $? <span class="hl opt">=</span> <span class="hl num">0</span><span class="hl opt">;</span> <span class="hl kwa">then</span>
	<span class="hl kwb">echo</span> <span class="hl str">&quot;Differences:&quot;</span>
	<span class="hl kwc">diff</span> <span class="hl kwb">-u</span> <span class="hl kwd">$REF_FILENAME $NEW_FILENAME</span>
    <span class="hl kwa">fi</span>
<span class="hl kwa">fi</span>

<span class="hl kwb">exit</span> <span class="hl kwd">$ret</span>
</code></pre></td></tr></table>
</div> <!-- class=content -->
<div class='footer'>generated by <a href='https://git.zx2c4.com/cgit/about/'>cgit v1.2.3</a> (<a href='https://git-scm.com/'>git 2.25.1</a>) at 2025-11-18 10:10:50 +0000</div>
</div> <!-- id=cgit -->
</body>
</html>
