The pasuk in Bereshit says (36:20) אֵ֤לֶּה בְנֵֽי־שֵׂעִיר֙ הַחֹרִ֔י יֹשְׁבֵ֖י הָאָ֑רֶץ לוֹטָ֥ן וְשׁוֹבָ֖ל וְצִבְע֥וֹן וַעֲנָֽה׃ Chazal explain that they are called the dwellers of the earth because they would "taste the soil" to know what to plant. See Shabbat 85a. I would like to know if this is an aggadic statement or if it is meant to be taken literally. If it is the latter, was this a common ancient belief - that one could taste the soil and gain knowledge thereby.
It can very well be taken literally, as it possible to taste soil to test soil by tasting it. Even today, while not recommended (soil-borne pathogens can be a danger to human health), this method is still used.
As far as it being a common ancient belief, that was indeed the case(1, 2, 3), although being as it is uncomfortable to taste soil directly, they suggest mixing it with water and tasting the water, as the water will have taken on the taste from the soil.